cbf
2016-04-05 15:41
has joined #fabric

cbf
2016-04-05 15:41
@cbf set the channel purpose: discussion relating to the fabric project (incubating)

binhn
2016-04-05 15:41
has joined #fabric

robert
2016-04-05 15:41
has joined #fabric

tamas
2016-04-05 15:41
has joined #fabric

sheehan
2016-04-05 15:41
has joined #fabric

admarkel
2016-04-05 15:42
has joined #fabric

simon
2016-04-05 15:46
has joined #fabric

kletkeman
2016-04-05 15:50
has joined #fabric

noam
2016-04-05 15:59
has joined #fabric

stan.liberman
2016-04-05 16:12
has joined #fabric

muralisr
2016-04-05 16:15
has joined #fabric

ghaskins
2016-04-05 16:18
has joined #fabric

troyronda
2016-04-05 16:20
has joined #fabric

shemnon
2016-04-05 16:28
has joined #fabric

andreas.fletcher
2016-04-05 16:29
has joined #fabric

kostas
2016-04-05 16:42
has joined #fabric

zaki
2016-04-05 17:20
has joined #fabric

jbowkett
2016-04-05 17:30
has joined #fabric

jachtermann
2016-04-05 17:33
has joined #fabric

tuand
2016-04-05 17:38
has joined #fabric

rgupta1
2016-04-05 17:56
has joined #fabric

tuand
2016-04-05 17:58
@muralisr: are you still seeing pbft unit tests failing ? I ran unit tests twice with commit 25addad and all tests passing

arnaud
2016-04-05 17:59
has joined #fabric

muralisr
2016-04-05 17:59
@tuand : I just saw a timeout failure

muralisr
2016-04-05 17:59
happens once a while

tuand
2016-04-05 18:01
hmmm ... ok, i'll keep trying to reproduce

muralisr
2016-04-05 18:02
I just refreshed and will be running tests within the hour

muralisr
2016-04-05 18:02
can let you know if you like

tuand
2016-04-05 18:02
yup, ping me

muralisr
2016-04-05 18:07
will do

kelly
2016-04-05 18:17
has joined #fabric

juan
2016-04-05 18:41
has joined #fabric

binhn
2016-04-05 18:52
anything on hyperledger/fabric goes here

ethertyper
2016-04-05 21:14
has joined #fabric

naddison
2016-04-05 21:36
has joined #fabric

gendal
2016-04-05 22:35
has joined #fabric

isyed
2016-04-05 22:38
has joined #fabric

renat-altoros
2016-04-06 00:59
has joined #fabric

gengjh
2016-04-06 05:26
has joined #fabric

novusopt
2016-04-06 06:26
has joined #fabric

tim.blankers
2016-04-06 07:23
has joined #fabric

vipinb
2016-04-06 12:39
has joined #fabric

dileban
2016-04-06 13:40
has joined #fabric

samchadwick
2016-04-06 14:52
has joined #fabric

kletkeman
2016-04-06 17:53
Does the new ID field in the the ChaincodeOpPayload mean that the result of an invoke will be saved somewhere for polling or even sent back to the client on an event bus that is unique to that peer? I.e. that we can communicate real error info back to clients asynchronously? Also, the ID is a JSON number, which is float64 in Go, so will there be an ID service that generates unique IDs on the peer? Or will we be expected to use some form of counter on a system for all apps to generate IDs? Was a GUID (e.g. time plus MAC address UUID) considered too large for this purpose?

guruprasath
2016-04-06 19:40
has joined #fabric

yu-kang
2016-04-06 21:27
has joined #fabric

vita
2016-04-07 06:28
has joined #fabric

primrose
2016-04-07 11:30
has joined #fabric

primrose
2016-04-07 11:36
ok so i wasn't at the f2f and i am sure my questions were most likely asked there... I've finally started the fabric build and i can't get my head around why the setup chain has its elements... i mean, aren't vagrant, docker and virtual box all geared towards providing the same start environment for a build? I've stared at the diagram for a while but i can't see why we have a vm in vagrant...

simon
2016-04-07 11:38
:simple_smile:

simon
2016-04-07 11:38
vagrant is used to provide a consistent, working development environment

simon
2016-04-07 11:38
vagrant uses virtualbox for this purpose

simon
2016-04-07 11:39
docker is used by fabric to execute chaincode processes

simon
2016-04-07 11:39
docker is also used during fabric development to easily spin up multiple instances of fabric peers to create a local network

simon
2016-04-07 11:39
does that help?

ghaskins
2016-04-07 11:59
@primrose: to add additional color to what @simon said: it is true that vagrant and docker both have overlapping goals in some sense (e.g. “repeatable” environments derived from a base image + devops orchestration file), but they are used for different purposes within the HL architecture

ghaskins
2016-04-07 12:02
for instance, docker has very specific requirements about the host (it has to be running a linux kernel, for instance)….even docker itself utilizes HV virtualization for this reason on non-linux platforms

ghaskins
2016-04-07 12:03
so vagrant+virtualbox get you a base linux environment that is suitable for hosting docker containers as well as providing other resources useful to building/running the fabric, and docker brings additional lightweight containers useful for things like chaincode isolation and network simulation

primrose
2016-04-07 12:11
@simon @ghaskins thank you!!! so vagrant+virtual box go together. got that. vagrant + vbox create the dev env whilst docker provides testing potential. with the added benefit that vagrant+vbox provide a "safe" initial machine for the docker bots (if i may call them that) to run in. is that right?

ghaskins
2016-04-07 12:12
yes, except I wouldnt limit docker role to just testing: it is currently used in a live environment too for chaincode isolation

ghaskins
2016-04-07 12:12
but otherwise, yes

ghaskins
2016-04-07 12:13
IOW, if you issue a “chaincode deploy”, it gets injected into a new docker container on each validating peer on the fly

ghaskins
2016-04-07 12:13
this would be true even for production

primrose
2016-04-07 12:14
@ghaskins ah i was googling what chaincode isolation actually meant. i get it now!

ghaskins
2016-04-07 12:14
cool

primrose
2016-04-07 12:18
i can't find a reaction which indicates that i'll sleep slightly less dumb tonight. but would you also be able to say why go needs to be installed on the host machine please? i would have thought this would only be needed in the VMs/Docker which are actually building and running the code?

ghaskins
2016-04-07 12:19
we are currently using go 1.6, though note you only need go on the host if you plan to edit/build there

ghaskins
2016-04-07 12:19
which is fairly common, but not strictly required

ghaskins
2016-04-07 12:19
at least, editing and building within an IDE

simon
2016-04-07 12:20
i think you need go only in the base docker image for chaincode

ghaskins
2016-04-07 12:20
@simon: i think @primrose is asking about the host environment itself

primrose
2016-04-07 12:21
@ghaskins: @simon yes the question was about the host env itself. the instructions ask for an install of go before all the VMs/Containers are setup and i wondered why

ghaskins
2016-04-07 12:21
@primose, i missed that you said “why” not “which”, which is why I said 1.6

ghaskins
2016-04-07 12:21
the why is to permit the user to edit the code in an environment that is most comfortable for them

primrose
2016-04-07 12:21
@ghaskins: i mistyped and corrected. mea culpa

ghaskins
2016-04-07 12:21
ah, that explains it

primrose
2016-04-07 12:22
i thought i was fast enough for it to be a seamless change!

ghaskins
2016-04-07 12:22
the basic idea is that the vagrant environment has all the stuff you need to build/run the code, but not necessarily all encompassing for editing

primrose
2016-04-07 12:22
+kudos to whoever put the setup together and made it so simple to run

primrose
2016-04-07 12:23
@ghaskins: got it. thanks! now i have to go and do something with the build...

vipinb
2016-04-07 12:39
There was talk at f2f about not requiring chaincode isolation as an alternative. So that known chaincode runs bound to the peer. This would be in addition to the current chaincode sandbox in docker

simon
2016-04-07 12:41
hi vipinb!

ghaskins
2016-04-07 12:44
@vipinb: i believe I have heard that called “system chaincode”, i think its under development

ghaskins
2016-04-07 12:45
theres also talk of making the isolation mechanism pluggable

vipinb
2016-04-07 12:49
Hello @simon my regards to Zurich

simon
2016-04-07 12:50
ghaskins: system chaincode is separate

simon
2016-04-07 12:50
system chaincode is administration/configuration

simon
2016-04-07 12:50
vipinb is talking about e.g. taking the blockstream/DAH code and linking it directly with fabric, instead of running it in a docker instance

simon
2016-04-07 12:51
of course you wouldn't deploy that code then

vipinb
2016-04-07 12:58
@simon . Just having the isolation mechanism pluggable like @ghaskins said. Which is having an option to have chaincode interpreter only, directly executable in peer/consensus context much like BTC. Of course only trusted/limited primitives will be allowed unlike the extensibility of docker contained chaincode. This was for speed and ease of deployment. Worth thinking about.

tuand
2016-04-07 13:08
, a reminder that with PR #1004 being merged overnight, the consensus config vars have been renamed from OPENCHAIN_OBCPBFT_xxxx to CORE_PBFT_xxxx and that CORE_PEER_VALIDATOR_CONSENSUS=pbft

tuand
2016-04-07 13:08
i've modified all the .yaml files as well but you might have some private configs that you'll have to update

vukolic
2016-04-07 13:13
has joined #fabric

primrose
2016-04-07 13:27
@vipinb: when you say "chaincode runs bound to the peer" do you mean that the chaincode can not be updated on that peer once it has spun up? if so then i do not understand the pluggable mechanism... what would be the point of lightweight interpretation then?

ramkomarraju
2016-04-07 13:39
has joined #fabric

ghaskins
2016-04-07 13:43
@simon: part of the conversation about system chaincode is that it would have access to resources/facilities that are normally isolated, so it reminded me of what @vipinb was talking about

simon
2016-04-07 13:43
yes

simon
2016-04-07 13:43
related

ghaskins
2016-04-07 13:44
ok

ghaskins
2016-04-07 13:45
there does seem to be a conflation of issues/concepts in this thread:

ghaskins
2016-04-07 13:46
one issue would be the notion of some chaincode that has enhanced priviledges/access, and another for alternate chaincode environments/interpreters

ghaskins
2016-04-07 13:46
i see them generally as orthogonal

simon
2016-04-07 13:47
system chaincode is not chaincode itself, it just uses the same mechanisms to maintain configuration state of the peers

simon
2016-04-07 13:47
yes, they are

ghaskins
2016-04-07 13:47
agreed

simon
2016-04-07 13:47
they have a common aspect: they don't run in a docker container :simple_smile:

ghaskins
2016-04-07 13:47
I see “system chaincode” as something that looks/acts like chaincode as far as the outside worlds is concerned: you can send it invokes and it can submit mutated state to consensus, for instance

ghaskins
2016-04-07 13:48
but implementation wise, it would probably be .go code compiled into the fabric binary

ghaskins
2016-04-07 13:48
there are other ways to do it too, that is just one idea

kletkeman
2016-04-07 13:49
re: vagrant and docker ... the very first search result for "vagrant vs docker" brings up http://stackoverflow.com/questions/16647069/should-i-use-vagrant-or-docker-for-creating-an-isolated-environment, which answered the question for me nicely when I first started playing with this environment ...

ghaskins
2016-04-07 13:50
@simon: an astute observation, yes

kletkeman
2016-04-07 13:52
-- re my question yesterday, I noticed a conversation today (on an issue I think) discussing client subscriptions and actual results of invokes being sent back. The discussion was of course around the question as to what happens when the network loses track of a transaction. Anyway, is this feature imminent?

cca
2016-04-07 14:16
has joined #fabric

zhipengh
2016-04-07 14:50
has joined #fabric

muralisr
2016-04-07 14:58
@ghaskins @vipinb @simon I think of it as “in process” chaincode with “system chaincode” as an instantiation of it. Helps separate out “system chaincode” specific concerns from the general chaincode specific functions. It also allows possibilities of non-system “in process” chaincode. And help to not take short cuts in the design/implementation …. break off from the current “container chaincode” design only where applicable.

simon
2016-04-07 14:58
right

ghaskins
2016-04-07 14:59
I cant think of where that distinction is important, but I am open minded to the possibility that it is

ghaskins
2016-04-07 15:01
to put it another way: running in process is one convenient way to implement “system chaincode”, but I cant think of a reason to want to run unstrusted code outside of isolation

ghaskins
2016-04-07 15:01
performance maybe? not sure

muralisr
2016-04-07 15:04
performance, maybe.… or policies ? system chaincode are given more rights

ghaskins
2016-04-07 15:04
I am all for well defined abstractions, of course, just not seeing where you would have code that doesn’t need enhanced privilege that you might want to run non-isolated

simon
2016-04-07 15:05
well, trusted code

ghaskins
2016-04-07 15:05
generally speaking, i think abstracting the chaincode environment such that it supports: system/priviledged chaincode, normal isolated chaincode (with choice on isolation vehicle), and, if desired, “in-process, untrusted” chaincode, that its a good thing

ghaskins
2016-04-07 15:06
even if the latter is never realized

simon
2016-04-07 15:06
for example, if DAH only wants to run a UTXO processor

simon
2016-04-07 15:06
why go through the hassle of adding all this docker complexity

ghaskins
2016-04-07 15:06
@simon: ah, now I see where the value is

ghaskins
2016-04-07 15:06
thank you, that is a good explaination

ghaskins
2016-04-07 15:07
so its not that its “untrusted”, its that certain use cases arent going to have users submitting chaincode

muralisr
2016-04-07 15:07
right

ghaskins
2016-04-07 15:07
got it, makes sense

muralisr
2016-04-07 15:08
right, tight, purposed environments

muralisr
2016-04-07 15:09
(can I say “purposed” ? :-))

ghaskins
2016-04-07 15:09
parses fine for me

ghaskins
2016-04-07 15:10
so, hyperledger/fabric as a platform for decentralized applications with state mutation goverened by consensus, where applications might be baked in, user submitted, or anything in between

ghaskins
2016-04-07 15:11
makes sense to me

simon
2016-04-07 15:11
well in the end, system state may have to be signed by a quorum of participants

ghaskins
2016-04-07 15:11
@simon: absolutely

simon
2016-04-07 15:11
not just automatically processed, but deliberately (policy) agreed to

simon
2016-04-07 15:12
do you have a suggestion on how to implement such a condition?

ghaskins
2016-04-07 15:12
if done right, the differences between system/in-process/untrusted should be handled the same w.r.t. consensus

simon
2016-04-07 15:12
more chaincode implementing this check?

ghaskins
2016-04-07 15:13
i envision that they look/act like any chaincode, they have an address, they can accept invokes/queries, and they can mutate Get/Put state which then goes through consensus

ghaskins
2016-04-07 15:13
the difference is really how they were deployed, thats it

ghaskins
2016-04-07 15:14
I envision that something like system/in-process is deployed via yaml, essentally consensus by common configuration

ghaskins
2016-04-07 15:15
something like untrusted is deployed as the mutation of state of a system chaincode that handles untrusted deployments

ghaskins
2016-04-07 15:15
where policy like AAA can be enforced in the system “deployment” chaincode

muralisr
2016-04-07 15:20
^ aligns with my thoughts… with the understanding some features (such as AAA) will be phased in

simon
2016-04-07 15:20
but that's my point: authorization policies will differ

muralisr
2016-04-07 15:22
dont understand that, simon...

simon
2016-04-07 15:22
muralisr: let's say you want to add validators to the system

simon
2016-04-07 15:23
this is something that cannot be decided unilaterally, but has to be performed by real-world agreements

ghaskins
2016-04-07 15:23
@simon: my thought there is through a combination of knobs on the “deployment” service, coupled with the fact that a network may opt to replace it with something else, you would achieve whatever policy you want

ghaskins
2016-04-07 15:23
network X might decide to configure yaml/genesis as [A,B,C], network Y, something else

simon
2016-04-07 15:23
so there needs to be a structure in place that prevents automatic change of the memberlist, unless certain real-world conditions are met

simon
2016-04-07 15:24
but, these conditions will be different for different deployments

simon
2016-04-07 15:24
therefore, how are these conditions formulated?

ghaskins
2016-04-07 15:24
those choices for yaml/genesis define what policies are in place for subsequent mutations

ghaskins
2016-04-07 15:25
and the consensus at this level is simply that the network is configured with a compatible yaml/genesis

simon
2016-04-07 15:25
so you're saying there is a limited set of policies you can choose from, and you might be able to parametrize those

ghaskins
2016-04-07 15:26
what I am saying is, the policies have a root in the initial configuration of the network

simon
2016-04-07 15:26
sure

ghaskins
2016-04-07 15:26
which is a combination of configuration+genesis block

simon
2016-04-07 15:26
i'm asking: how are these policies implemented

ghaskins
2016-04-07 15:26
ok, lets say we had a system chaincode for deploying other chaincode

ghaskins
2016-04-07 15:27
the only way to get untrusted code in the system is to send a “deploy” invoke to the system chaincode address for the deployment service

ghaskins
2016-04-07 15:27
that code is responsible for implementing the policy of who/what/where/whatever on what consistutes a valid deploy transaction

simon
2016-04-07 15:27
okay

simon
2016-04-07 15:28
so write go code

ghaskins
2016-04-07 15:28
some of that policy might be driven by yaml knobs, some of that policy might be baked in to the go code

ghaskins
2016-04-07 15:28
if an operator likes the reference implementation of the deployment service, they deploy it with the knobs they want

ghaskins
2016-04-07 15:28
if they dont, they omit/replace it with an alternate system chaincode

simon
2016-04-07 15:29
would that system chaincode run in a docker container?

ghaskins
2016-04-07 15:29
i dont envision that, no

simon
2016-04-07 15:29
that means that the peer needs to be built locally

kelly
2016-04-07 15:29
@ghaskins and @simon I think that is a good idea

ghaskins
2016-04-07 15:30
I think like I said before, there is the concept of an abstract chaincode endpoint that looks/acts like chaincode, it has an address, it can accept transactions, it can submit mutated state to consensus

kelly
2016-04-07 15:30
Today, for example, you can't run docker's in a trusted execution evironment

ghaskins
2016-04-07 15:30
but the environment that a system chaincode runs in is likely completely different from an untrusted chaincode

ghaskins
2016-04-07 15:30
it is likely something just compiled into the fabric

simon
2016-04-07 15:30
uh oh

ghaskins
2016-04-07 15:31
why “uh oh”?

simon
2016-04-07 15:31
requiring admins all over the world to compile their binaries in exactly the same way...

ghaskins
2016-04-07 15:31
its not really different than deciding what your yaml/genesis are, right? code base selection is part of that criteria

simon
2016-04-07 15:31
genesis is fixed via cryptographic hash

ghaskins
2016-04-07 15:31
while that is a perfectly valid model, I envision it would be more like a release

ghaskins
2016-04-07 15:32
no, it isnt :wink:

ghaskins
2016-04-07 15:32
genesis is “fixed” by what the network of nodes agrees its value is out of band from the fabric

simon
2016-04-07 15:32
yes, by means of a cryptographic hash

simon
2016-04-07 15:33
no shared genesis hash = not part of same chain

simon
2016-04-07 15:33
more difficult with compiled code

ghaskins
2016-04-07 15:34
otp

simon
2016-04-07 15:34
i was thinking that maybe some form of language expressing the authorization criteria could be used, and a program of this language (script) be part of the genesis block

sheehan
2016-04-07 15:35
@simon: "requiring admins all over the world to compile their binaries in exactly the same way…” I haven’t looked into it yet, but I was pointed to https://gitian.org/ the other day. It may be worth looking into

simon
2016-04-07 15:36
fancy

simon
2016-04-07 15:37
but one binary, signed by a trusted entity - far simpler

primrose
2016-04-07 15:47
@simon: is there only one trusted entity in this scenario?

simon
2016-04-07 15:48
i suppose

simon
2016-04-07 15:49
i mean, standard sysadmin stuff

simon
2016-04-07 15:49
system package manager trusts a set of keys

georglink
2016-04-07 15:50
has joined #fabric

primrose
2016-04-07 15:50
to me the whole point of a blockchain is for the trust to be built into the system itself... i didn't think of the build elements but it sounds weird to make an exception of them

simon
2016-04-07 15:55
well, this is where you transition from network to individual

simon
2016-04-07 15:56
your local admin always has power over your systems

simon
2016-04-07 15:56
but i'd love to hear solutions

vipinb
2016-04-07 15:58
Identity will enter the picture, in this case meta identity

ghaskins
2016-04-07 16:34
@simon: back

ghaskins
2016-04-07 16:35
I think no matter how you slice it, there is extrinsic agreement, and there is intrinsic agreement

ghaskins
2016-04-07 16:35
extrinsic agreement would be things like the choice of software/configuration/genesis

ghaskins
2016-04-07 16:36
whether that means there is one “http://myblockchain.com” that you download a package that has the software/configuration/genesis that all operators trust/use, or some other mechanism doesnt matter

ghaskins
2016-04-07 16:36
at least, conceptually

ghaskins
2016-04-07 16:37
some other mechanism might be a conference call where the parties agree on the git sha and yaml contents and then go off and build it themselves, it doesnt matter

simon
2016-04-07 16:37
conceptually correct, practically maybe difficult?

ghaskins
2016-04-07 16:37
i am not advocating one vs the other

ghaskins
2016-04-07 16:37
i am just saying, that extrinsic agreement needs to exist

simon
2016-04-07 16:37
i'm strongly advocating for correct by design

simon
2016-04-07 16:38
meaning, the extrinsic agreement is required anyhow (people installing the same thing), but the system should prevent incorrect operation

ghaskins
2016-04-07 16:38
and it is via this mechanism that establishes policy, such as what the deploy-system-chaincode does

simon
2016-04-07 16:38
oh, and fail early

ghaskins
2016-04-07 16:39
and it would: if people didnt establish the extrinsic agreement, the network probably would never converge, or be able to achieve consensus, etc

ghaskins
2016-04-07 16:39
but that isnt really my point

simon
2016-04-07 16:39
don't fail when you try to update your policy on how to deploy new chaincodes, because it turns out different nodes are configured differently

ghaskins
2016-04-07 16:39
my point is that it is the extrinsic agreement that establishes the policy that governs the intrinsic behavior

simon
2016-04-07 16:40
sure

simon
2016-04-07 16:40
i think we agree in principle?

ghaskins
2016-04-07 16:40
i think so

simon
2016-04-07 16:42
my point was that the system should check that all nodes are configured the same way (due to extrinsic agreement)

simon
2016-04-07 16:43
policy as implemented in the code: difficult to check (different platforms mean different binary, etc.)

simon
2016-04-07 16:43
policy implemented e.g. as a script (i.e. interpreted rules): easier to test, can even be part of the genesis block

ghaskins
2016-04-07 16:46
oh sure, i agree with you on that

simon
2016-04-07 16:46
great!

ghaskins
2016-04-07 16:47
at least in terms of making it easier

ghaskins
2016-04-07 16:47
not necessarily in how to make it easier

ghaskins
2016-04-07 16:47
i have no strong opinion on that

simon
2016-04-07 16:47
yea i don't know what the best is

simon
2016-04-07 16:47
i guess bitcoin script is a strong precedent

ghaskins
2016-04-07 16:48
i think the most important thing is, a mismatch is likely to already be handled (e.g. membership list disparity would prevent quorum from forming, or the EV checks on system chaincode mutations wont match, failing to commit its transactions, etc

simon
2016-04-07 16:49
if we design it carefully

simon
2016-04-07 16:49
and there are no bugs, etc.

ghaskins
2016-04-07 16:49
but, having it say “hey, your network is mismatched” is a better behavior than just failing to every get a convergence

simon
2016-04-07 16:49
yes

simon
2016-04-07 16:49
better stop the network than keeping operating under inconsistency

ghaskins
2016-04-07 16:49
right

ghaskins
2016-04-07 16:50
it would need to be carefully thought out too, though

ghaskins
2016-04-07 16:50
as disparity doesnt always mean incompatiblity

ghaskins
2016-04-07 16:50
for instance, older vs newer releases running together

ghaskins
2016-04-07 16:50
the main criterial is the protocol can operate in agreement

satheesh
2016-04-07 17:46
has joined #fabric

evan.wagner
2016-04-07 20:00
has joined #fabric

todd_mcd_r3
2016-04-08 00:34
has joined #fabric

nick
2016-04-08 03:00
has joined #fabric

martindale
2016-04-08 03:14
has joined #fabric

varnaudov
2016-04-08 07:01
has joined #fabric

mcrafols
2016-04-08 14:32
has joined #fabric

antonylewis
2016-04-08 14:43
has joined #fabric

manish-sethi
2016-04-08 15:08
has joined #fabric

primrose
2016-04-08 16:02
@cbf: quick note to say I got fabric to build without any hiccups so nothing to report! well done to team!

primrose
2016-04-08 16:04
There were 3 proposed projects to be done at the f2f. would anyone have any more in depth notes on those. I'm trying to find a way to play with the code but haven't got a clue how to start and my knowledge of chaincode though growing is truly minimal...

gengjh
2016-04-08 16:11
@primrose: try this one: https://github.com/hyperledger/fabric/blob/master/docs/dev-setup/devnet-setup.md, it will help u to deploy your first chaincode.

stan.liberman
2016-04-08 16:25
@primrose: Our experiment with writing a chaincode is https://github.com/stanliberman/obc-peer/tree/master/openchain/example/chaincode/asset_manager it’s now out of date with the new fabric codebase. It should still work once corrected for new names. Wiki has excellent instructions on getting things running and you can read through our scripts for more user level interaction.

toddsjsimmer
2016-04-08 16:56
has joined #fabric

keoja
2016-04-08 17:07
has joined #fabric

amundson
2016-04-08 17:56
has joined #fabric

pjholmes
2016-04-08 23:06
has joined #fabric

stefan.teis
2016-04-09 10:34
has joined #fabric

muralisr
2016-04-09 19:31
@stan.liberman: I’m sure you got it…but do let me know if you need help updating asset_manager chaincode (and thanks again for that!)

paulojrmoreira
2016-04-10 21:53
has joined #fabric

sbarclay
2016-04-11 16:01
has joined #fabric

jatinderbali
2016-04-11 17:12
has joined #fabric

keithsmith
2016-04-11 20:45
has joined #fabric

akakoudakis
2016-04-11 22:00
has joined #fabric

carmania
2016-04-12 14:37
has joined #fabric

mandler
2016-04-13 08:05
has joined #fabric

novusopt
2016-04-14 06:33
is there any example which shows how to generate custom events within a chaincode?

davidcosta
2016-04-14 09:17
has joined #fabric

nickgaski
2016-04-14 13:58
has joined #fabric

inabatk
2016-04-14 15:05
has joined #fabric

christophera
2016-04-14 17:30
has joined #fabric

timswanson
2016-04-14 17:34
has joined #fabric

sheehan
2016-04-14 21:00
There’s an event_test at https://github.com/hyperledger/fabric/blob/master/events/events_test.go This allows you to listen to block events from the chain. Sending events from within a chaincode is not recommended because 1 - The chaincode will be run by multiple peers 2 - Just because code in a chaincode was invoked on a given peer does not guarantee the changes will be in a block

novusopt
2016-04-15 05:28
@sheehan: thank u One more question from my side does a chaincode have limitations regarding how many state entries he can have

hmchen
2016-04-15 06:31
has joined #fabric

sheehan
2016-04-15 13:21
@novusopt: no limitation

webdaford
2016-04-15 14:06
has joined #fabric

jonathan.mohan
2016-04-15 17:22
has joined #fabric

ajlopez
2016-04-15 22:05
has joined #fabric

docent
2016-04-17 16:18
has joined #fabric

nathonline
2016-04-17 18:08
has joined #fabric

gregt
2016-04-17 18:22
has joined #fabric

mark.moir
2016-04-17 21:54
has joined #fabric

ibmamnt
2016-04-18 01:41
has joined #fabric

gennady.laventman
2016-04-18 11:08
has joined #fabric

novusopt
2016-04-18 11:55
@IBM what is your preferred way to debug the fabric code?

simon
2016-04-18 12:00
what aspect

novusopt
2016-04-18 12:13
I want to walk through the code via breakpoints. I used IntelliJ with the Go plugin but i am facing some issues. Therefore i am asking how do you debug....

simon
2016-04-18 12:14
i have not used breakpoint debugging so far - tool situation for go is not so good

simon
2016-04-18 12:15
are you interested in something specific?

muralisr
2016-04-18 12:15
@novusopt: I have not used it myself but I know some who have had some success with Eclipse

novusopt
2016-04-18 12:16
@simon: nothing specific, get familiar with the code base

simon
2016-04-18 12:16
okay

novusopt
2016-04-18 12:16
@muralisr: thank u for the information!

muralisr
2016-04-18 12:21
@novusopt: sure thing…. can’t promise but I can try and find some info if you like

novusopt
2016-04-18 12:21
@muralisr: that would be nice. I appreciate it!

ghaskins
2016-04-18 12:44
@novusopt: I use delve (https://github.com/derekparker/delve), works well

ghaskins
2016-04-18 12:44
I wrote up a wiki entry on it


ghaskins
2016-04-18 12:45
its like command-line gdb style debugger, but it actually works with go

novusopt
2016-04-18 12:46
@ghaskins: Are you using delve within an IDE or in combination with the command line? Yes that would be helpful. Thanks!

ghaskins
2016-04-18 12:46
just command line for debugging

ghaskins
2016-04-18 12:46
I do use IntelliJ for editing Go, but not for debugging

novusopt
2016-04-18 12:49
@ghaskins: I will try the same. Let's see if i can fix the issues regarding the debugging within IntelliJ...

ghaskins
2016-04-18 12:50
@novusopt: I am not an expert by any stretch, but my understanding is that most IDEs have not really integrated go debugging into their go support

ghaskins
2016-04-18 12:50
so not sure how much success you will find there

novusopt
2016-04-18 12:52
@ghaskins: I tried it with a simple Go project and it works..

ghaskins
2016-04-18 12:55
Delve or IntelliJ?

shsedghi
2016-04-18 13:16
has joined #fabric

shsedghi
2016-04-18 13:20
I use Eclipse with GO and OBC for sometime. I can do almost everything that I do in Java with GO except when I click on a variable it does not highlight all. Debugging , outline are as good as Java.

muralisr
2016-04-18 13:22
@novusopt … @shsedghi was the person I had in mind on Eclipse/GO

muralisr
2016-04-18 13:22
It woukd be interesting to compare @ghaskins Delve and Eclipse/GO

muralisr
2016-04-18 13:23
(thanks @shsedghi )

novusopt
2016-04-18 13:26
@ghaskins: Debugging within IntelliJ

ghaskins
2016-04-18 13:31
ah, cool, things must have really improved

ghaskins
2016-04-18 13:31
when I first starting looking at go last summer, it was poorly supported in the IDEs I tried

ghaskins
2016-04-18 13:31
debugging wise, i mean

shsedghi
2016-04-18 13:33
@ghaskins: Eclipse GO plugin (GOClipse) relies on 2-3 other GO packages to do that, and it does an awesome job.

ghaskins
2016-04-18 13:35
awesome, ill check it out (though I prefer IntelliJ, but I suspect they are in similar support levels)

shsedghi
2016-04-18 13:37
I will put the setup procedure and Best practices with Eclipse GO when I learn how to update WIKI.

novusopt
2016-04-18 13:47
@shsedghi: Would be nice

shsedghi
2016-04-18 15:21
@novusopt: @ghaskins @muralisr https://github.com/hyperledger/fabric/wiki/Go-Development-Portal update with Goclipse setup, pictures are available and will be update later

jonathanlevi
2016-04-18 20:48
has joined #fabric

ibmamnt
2016-04-19 04:20

ibmamnt
2016-04-19 04:21
How do I obtain chaincodeID.name value after the deploy ?

muralisr
2016-04-19 04:44
@ibmamnt: there is no easy way to do that today. You can get transactions from a block, unmarshal with code etc. which clearly is not desirable. There is discussion of a naming service which when implemented will solve naming issues

ibmamnt
2016-04-19 04:57
@muralisr: Thanks for the answer. In a debug mode, I can put arbitrary name via CORE_CHAINCODE_ID_NAME env. So obtaining name is not high priority at this moment.

muralisr
2016-04-19 05:00
@ibmamnt: that’s good to know

novusopt
2016-04-19 07:54
@shsedghi: Thank u

novusopt
2016-04-19 14:07
I have a question regarding the membership service, is this the right channel or shall i create a new channel for that?

muralisr
2016-04-19 14:11
this channel is probably good place to start ….

muralisr
2016-04-19 14:18
I don’t know what level the channels shoukd be at… hence my suggestion to get started here

novusopt
2016-04-19 14:20
In the protocol specification you are saying (chapter https://github.com/hyperledger/fabric/blob/master/docs/protocol-spec.md#4321-confidentiality-against-users) "Finally users are given the contract's public key PKc, for them to be able to encrypt information related to that contract for the validators (or any in possession of SKc) to be able to read it. Transaction certificate of each contract user is appended to the transaction and follows that user's message....."

novusopt
2016-04-19 14:21
how do you distribute the public key of the contract (PKc) to the involved users?

adc
2016-04-19 14:33
has joined #fabric

mcrafols
2016-04-19 14:34
I read about the CertificateHandler interface in the section 4.4.1 Invocation access control which supposedly allows you to sign and verify messages

mcrafols
2016-04-19 14:35
but as @novusopt I had the same question on who manages the user's certificates and how the application (for example Marbles) could access it to sign and verify signatures

novusopt
2016-04-19 14:38
@mcrafols: the section 4.4.1 explains how to implement an own access control at the application layer...

mcrafols
2016-04-19 14:39
@novusopt: but it says:

mcrafols
2016-04-19 14:39
The client-application can request the fabric to sign and verify any message with specific transaction certificates or enrollment certificate the client owns; this is expressed via the Certificate Handler interface

novusopt
2016-04-19 14:40
@mcrafols: my question is after i created a chaincode and i specified an ACL, how does the fabric distribute the public key of the chaincode to the users specified in the ACL

novusopt
2016-04-19 14:43
without customizing the invocation access control

mcrafols
2016-04-19 14:52
ok, didn't understand!

novusopt
2016-04-19 15:03
@mcrafols: didnt understand my question?

mcrafols
2016-04-19 15:06
you are asking about confidentiality and I was asking about invocation access control I thought you were asking about the latter that's why I metioned the CertificateHandler (a question I still need to clarify)

novusopt
2016-04-19 15:09
@mcrafols: i see

joseph
2016-04-19 15:11
has joined #fabric

wrv
2016-04-19 15:16
has joined #fabric

josh
2016-04-19 15:33
has joined #fabric

mjsikorsky
2016-04-19 15:36
has joined #fabric

adc
2016-04-19 16:24
Hi @novusopt, sorry if the paragraph is not clear enough. Actually, the deployer can specify in the deploy transaction who is able to invoke the chaincode he is deploying. If you look at the picture in that same paragraph, there is a section called "contract users".

adc
2016-04-19 16:26
In that section the deployer has to name of who can invoke the chaincode, the recipient, by specifying one of the TCert of the recipient. The deployer will also encrypt pkC under the public key of the recipient.

adc
2016-04-19 16:27
Once the recipient gets the deploy transaction in some way, he can figure out that he has been named there and retrieve pkC that can used to encrypt the invoke/execute transaction payload

adc
2016-04-19 16:27
Access control is a different story. I can give more details on that too if needed.

novusopt
2016-04-19 16:37
@adc: first of all thank u for the information! You mentoined that the users can figure out that they have been named, how does the fabric handle this?

novusopt
2016-04-19 16:38
If you have more information then please share with us :grin:

hyperspace
2016-04-19 16:46
has joined #fabric

bobbiejc
2016-04-19 16:52
has joined #fabric

benedikt.herudek
2016-04-19 19:15
has joined #fabric

dan
2016-04-19 20:21
has joined #fabric

eskoviak
2016-04-19 20:27
has joined #fabric

ibmamnt
2016-04-20 01:44
Hi, I got the following error when I try to deploy sample chaincode. ```10:30:14.801 [container] start -> DEBU 048 Start container dev-jdoe-f94be74d5e8eaa1771642831198cf460486457ce96d765b552613040d4c095514c3dbb73c9d2c3fb743de570af8d463dcafb56683d3f32c4a49d597cea2676ad 10:30:14.801 [container] createContainer -> DEBU 049 Create container: dev-jdoe-f94be74d5e8eaa1771642831198cf460486457ce96d765b552613040d4c095514c3dbb73c9d2c3fb743de570af8d463dcafb56683d3f32c4a49d597cea2676ad 10:30:14.821 [container] start -> ERRO 04a start-could not recreate container no such image```

ibmamnt
2016-04-20 01:44
I wonder about *no such image*.

ibmamnt
2016-04-20 01:55
I noticed the image is not found (described in core.yaml). ```$ docker pull openblockchain/baseimage:latest Pulling repository http://docker.io/openblockchain/baseimage Tag latest not found in repository http://docker.io/openblockchain/baseimage``` How should I fix this ?

tsariounov
2016-04-20 01:59
has joined #fabric

ghaskins
2016-04-20 02:16
@ibmamnt: are you using vagrant?

ibmamnt
2016-04-20 02:17
No, I'm building the environment from scratch. Somehow I was able to build the baseimage. I needed to pull release 0.0.9.

ghaskins
2016-04-20 02:18
if you are running your own, you should emulate the vagrant environment by running ./scripts/provision/[docker|common].sh

ghaskins
2016-04-20 02:18
that image gets created locally during provisioning

ibmamnt
2016-04-20 02:19
Yes, that what I did now. :simple_smile: ```cd /opt/gopath/src/github.com/hyperledger/fabric/scripts/provision docker.sh 0.0.9```

ghaskins
2016-04-20 02:19
this is tripping a lot of people up, we need to get better documentation

ghaskins
2016-04-20 02:19
yep, thats exactly right

ibmamnt
2016-04-20 02:20
Vagrant (actually setup.sh) hide most of important things. So I've decided to emulate vagrant setup in my local devenv.

ghaskins
2016-04-20 02:21
smart

ghaskins
2016-04-20 02:22
theres comments in that file in case you are curious why :latest isnt upstream

rudis
2016-04-20 02:25
has joined #fabric

ibmamnt
2016-04-20 02:32
After I got error, I read through the document. And understood fully about ":latest" is not used in Hyperledger project. By the way, docker image is now runnning after /chaincode/deploy restapi call. I now understand chaincode.name is included in docker container image ( previously I raised a question how to find chaincodeID.name). Now, I can invoke restapis even if I forget the respose.

buhrmi
2016-04-20 04:26
has joined #fabric

buhrmi
2016-04-20 04:26
Hey guys can I use javascript to write chaincode?

ibmamnt
2016-04-20 04:55
As of 2016/April/20th, Golang is supported by Hyperledger fabric project. According to FAQ, JavaScript and Java support is planned within 2016. https://github.com/hyperledger/fabric/blob/master/docs/FAQ/chaincode_FAQ.md

buhrmi
2016-04-20 05:43
cool is there funding up for grabs to get that implemented? i already know some cases where people would love to present their smart contracts to judges and jury but can't cause they're not in javascript

buhrmi
2016-04-20 05:43
so i wanna work on that part

shiva
2016-04-20 05:54
has joined #fabric

adc
2016-04-20 06:57
@novusopt, there are multiple ways to get the deploy transaction. One is through an off-band channel (i.e. on a certain web site there is the chaincode id of the deploy transaction). Another one could be through a trusted third party that monitor the blockchain on you behalf and collects the deploy transactions where you are named. We are also looking into other alternatives to make this process as simple and intuitive as possible :simple_smile:

novusopt
2016-04-20 07:00
@adc yes that make sense, thank u :simple_smile: so that means currently the fabric does not notify the involved users?

adc
2016-04-20 07:08
@novusopt, yes, it is correct.

harry96
2016-04-20 09:03
has joined #fabric

beauson45
2016-04-20 13:06
has joined #fabric

binhn
2016-04-20 14:03
with the Latest commit 488d266 issue #1131 — moving main.go to fabric/peer. You may encounter the problem in vagrant: ```vagrant@hyperledger-devenv:v0.0.9-2457c97:/opt/gopath/src/github.com/hyperledger/fabric$ cd peer/ -bash: cd: peer/: Not a directory``` It seems vagrant caches the `peer` exe file. The solution is to run: ```vagrant halt vagrant up ```

mcrafols
2016-04-20 14:24
To implement an ACL into the invocation methods the application layer must use CertificateHandler? How can the application access the CertificateHandler to sign the invocation?

adc
2016-04-20 14:34
@mcrafols: Actually a CertificateHandler and a TransactionHandler are needed as described here https://github.com/hyperledger/fabric/blob/master/docs/tech/application-ACL.md

adc
2016-04-20 14:35
How the application can access these structures is more trickier. We are exactly working on this to make the API accessible in a secure way to the application. In the meantime, you can have a look at here https://github.com/hyperledger/fabric/tree/master/examples/chaincode/go/asset_management

adc
2016-04-20 14:36
it contains an example (code) of how to implement access control at the chaincode level

mcrafols
2016-04-20 14:37
I see, the API access is what I was missing

mcrafols
2016-04-20 14:37
because the user ECerts are stored in the trusted VP right? For the ChainCode to access the public keys of other user's certificates you need to connect the ChainCode to the CA?

mcrafols
2016-04-20 14:52
and how is the user ECert accessed from the application, is it possible currently?

adc
2016-04-20 15:17
@mcrafols: Q1: yes, Q2: actually the chaincode stores the ECert/TCert in its state

adc
2016-04-20 15:18
the ECert can be accessed via REST api but anyway we are actively working on the client SDK that will allow to orchestrate the chaincodes

mcrafols
2016-04-20 15:21
@adc: oh I see: GET /registrar/{enrollmentID}/ecert retrieves the Ecert from the trusted VP not the CA?

davids
2016-04-20 21:40
has joined #fabric

csweir
2016-04-20 23:46
has joined #fabric

nycnewman
2016-04-21 01:34
has joined #fabric

ibmamnt
2016-04-21 05:47
Question about environmental variable. I believe config file and environmental variable handling is done by "viper". The setting file "core.yml" has cascade, like: ```peer: id: jdoe networkId: dev addressAutoDetect: false port: 30303 gomaxprocs: -1 workers: 2 validator: enabled: true```

ibmamnt
2016-04-21 05:48
If I want change the peer functionality as non-validating peer by environmental variable, CORE_ prefixed like: ```CORE_PEER_VALIDATOR_ENABLED=false``` is valid setting. Is this understanding correct ?

awsom82
2016-04-21 12:18
has joined #fabric

jasmeet
2016-04-21 13:06
has joined #fabric

tuand
2016-04-21 13:15
that's the correct syntax for the config variables. Look in the .yml files in fabric/bddtests or fabric/consensus/docker-compose-files for examples

markparz
2016-04-21 13:19
has joined #fabric

jeffgarratt
2016-04-21 13:24
has joined #fabric

weizhao
2016-04-21 13:25
has joined #fabric

jasmeet
2016-04-21 13:45
Just wanted to know While we are invoking /initiating/querying from terminal what if we want to achieve this from a fancy UI I have made a page in html how will it talk to my terminal can anyone please guide me on this ?

jasmeet
2016-04-21 13:46
Also going through marbles app


jeffgarratt
2016-04-21 13:47
@jasmeet: this is the swagger file which documents the REST API.

jeffgarratt
2016-04-21 13:47
you can actually load this into the swagger UI and it will dynamically generate REST calls for you


turnerst999
2016-04-21 13:48
has joined #fabric

grapebaba
2016-04-21 14:01
has joined #fabric

srbamb
2016-04-21 14:02
has joined #fabric

jasmeet
2016-04-21 14:02
@jeffgarratt: @stan.liberman appreciate your quick response

srbamb
2016-04-21 14:02
@stan.liberman: it might be useful to mention that our setup of OBC is in a bare metal env, would that make any difference

grapebaba
2016-04-21 14:03
besides js SDK, any other language will be supported?

jeffgarratt
2016-04-21 14:03
yw :simple_smile:

tuand
2016-04-21 14:06
@grapebaba other languages are being discussed. Can you create an issue on github hyperledger/fabric ? easier that way to remember and track what your requirements might be

grapebaba
2016-04-21 14:37
sure

stan.liberman
2016-04-21 15:19
@srbamb: by bare metal do you mean outside of Vagrant? It should not matter, you’ll just need to use the right hostname

ghaskins
2016-04-21 15:48
FYI, I renamed my obcc/hlcc tool to “chaintool” after feedback that the previous name was too confusing: https://github.com/ghaskins/chaintool

muralisr
2016-04-21 16:00
@ghaskins: trying to do a “in a nutshell” of “chaintool” : An end user writing chaincode can describe it in highlevel protobuf structure and chaintool will generate (1) the chaincode with appropriate methods stub and (2) package it for the user so it can be directly deployed … please do change as you see fit ?

muralisr
2016-04-21 16:01
(Omitted the other benefits of extending the tool itself for other languages and so forth )

ghaskins
2016-04-21 16:01
thats great Murali, thanks

ghaskins
2016-04-21 16:02
Perhaps I should have a “Summary” header in the README right up front

ghaskins
2016-04-21 16:02
with that

muralisr
2016-04-21 16:03
as a third person it helps me to get that level of understanding (if correct) in my head

muralisr
2016-04-21 16:03
sure, thanks!

ghaskins
2016-04-21 16:05
updated. better?

muralisr
2016-04-21 16:06
yes, thank you

ghaskins
2016-04-21 16:06
thank you!

harshal
2016-04-21 16:10
has joined #fabric

shsedghi
2016-04-22 00:40
I have wiped out /var/htperledger/production and also /var/folders/63/T/herperledger still it complains about identity token match, where should I delete to get clean state, like the first time install?

muralisr
2016-04-22 00:44
can you try rm -rf /var/hyperledger/* ?

gengjh
2016-04-22 01:05
not sure if this is right channel to discuss the performance issue. Anyone have comments regarding this? https://hyperledgerproject.slack.com/archives/general/p1461205451000125


gengjh
2016-04-22 01:07
Where can I find the hyperledger performance roadmap?

ibmamnt
2016-04-22 05:50
@ghaskins: My ubuntu protoc (protobuf-compiler package on 14.04LTS) seems to be out of date, since I get error > Error: interface.proto:5:10: Unrecognized syntax identifier "proto3". This parser only recognizes "proto2". Do I need to install from source from https://github.com/google/protobuf ?

ibmamnt
2016-04-22 06:28
@ghaskins: Sorry, I was able run chaintool by obtaining protoc 3.0.0-beta-2 release bits. By the way, this is nice work. Hope proposal is going to be accepted.

novusopt
2016-04-22 08:49
Hi, i have a question regarding the buckt-tree, where i can specify the size (max. nbr of entries) of a bucket?

jasmeet
2016-04-22 10:46
While running this step -Start up the peer node with no connections to a leader or validator as follows. cd /opt/gopath/src/github.com/openblockchain/obc-peer ./obc-peer peer Getting Error - Failed to listen: listen tcp 0.0.0.0:30303: bind: address already in use

muralisr
2016-04-22 10:52
@jasmeet: will be good to get on hyperledger… in any case it just means likely peer is running somewhere (unless you have another app using the port)

jasmeet
2016-04-22 10:56
@muralisr: simultaneously working on hyperledger as well but meanwhile can u tell how to free the port

shiva
2016-04-22 10:57
@jasmeet ./obc-peer stop might be a good place to start

jasmeet
2016-04-22 11:00
@shiva: tried it still same error

ghaskins
2016-04-22 11:32
@ibmamnt: sounds like you figured it out, but yes. The tool requires proto3. It works with whatever protoc we install with vagrant, fwiw

ghaskins
2016-04-22 11:34
It's probably the same as what you installed, but I'd have to look when I am at a computer

srbamb
2016-04-22 11:34
@ghaskins: , can you provide some guidance on the issue highlighted by Jasmeet above

ghaskins
2016-04-22 11:35
looks

ghaskins
2016-04-22 11:37
The two things to check are: is the peer still running? (ps -ef | grep peer) and who has the port (netstat -apn | grep 30303)

ghaskins
2016-04-22 11:38
The next step depends on the answer to those questions

jasmeet
2016-04-22 11:41
@srbamb: lsof -ti:30303 | xargs kill -9

ghaskins
2016-04-22 11:47
I never knew lsof could do that, thanks @jasmeet

ghaskins
2016-04-22 11:47
What did you find ?

ghaskins
2016-04-22 11:47
Was it still running the peer?

aditya
2016-04-22 11:56
has joined #fabric

jasmeet
2016-04-22 12:04
@ghaskins: i ran to start the test blockchain 'go test -v -run TestServerOpenchain_API_GetBlockCount, and got this error - 'exit status 2 FAIL http://github.com/openblockchain/obc-peer/openchain 0.949s'

jasmeet
2016-04-22 12:04
do you have a solution for this?

ghaskins
2016-04-22 12:06
not specifically, but I would encourage you to switch to the HL code, I am not sure the legacy repo is maintained any more


ghaskins
2016-04-22 12:07
that is where all the new patches are going IIUC

ghaskins
2016-04-22 12:07
if you still see that problem when you run against the latest HL tree, there will be more people that will be able to help

ghaskins
2016-04-22 12:08
is that possible? or do you have a constraint to stay with the older repo?

jasmeet
2016-04-22 12:14
@ghaskins: have already worked on OBC ,was able to run custom chaincode in OBC environment . wanted to test To set up Swagger-UI

ghaskins
2016-04-22 12:15
ok, sorry I don’t know why that unit test is no longer passing for you

jasmeet
2016-04-22 12:24
@ghaskins: "Subsequently restart the peer process." - Is there any command available to restart the peer process? I had killed the peer and then started it again, to create the test blockchain(Step 8)

ghaskins
2016-04-22 12:25
afaik, there is only stop and start

ghaskins
2016-04-22 12:25
to effect a restart

jasmeet
2016-04-22 12:26
Have you tested this swagger-UI, without any errors?

ghaskins
2016-04-22 12:26
I dont use swagger, no

jasmeet
2016-04-22 12:26
What do you use to interface the blockchain?

ghaskins
2016-04-22 12:26
generally curl

ghaskins
2016-04-22 12:27
though I will be transitioning to the SDK shortly as soon as it becomes a tenable path for my development

ghaskins
2016-04-22 12:27
i also use the the "fabric chaincode” subcommand probably as frequently as curl

ghaskins
2016-04-22 12:29
im sure there are plenty of folks who know about the swagger workflow, i am just not one of them

jasmeet
2016-04-22 12:30
@ghaskins: thanks for your help

shsedghi
2016-04-22 13:01
@muralisr: The issue was the .membsersvc file was hidden and I used UI to drag them to trash. rm -rf /var/hyperledger/production/* is a better command

sheehan
2016-04-22 15:15
@novusopt: You can specify the number of buckets in core.yaml using the numBuckets property. Keys are evenly distributed between these buckets

jeffgarratt
2016-04-22 16:55
@jasmeet the behave tests have a convenient mechanism for interacting with the chain

novusopt
2016-04-22 17:56
@sheehan: thanks for the answer. But i mean is it possible to customize the number of entries in one bucket?

sheehan
2016-04-22 18:41
That’s not possible today

ghaskins
2016-04-22 21:34
@ibmamnt: FYI, here is the fabric side support for the tool: https://github.com/ghaskins/hyperledger-fabric/tree/chaintool-snapshot-20160422-1729

ghaskins
2016-04-22 21:35
It seems you are not using vagrant, so you would have to handle getting the chaintool on your $PATH manually

ghaskins
2016-04-22 21:35
I include the binary in ./devenv/tools FWIW, or you can just build it from source

novusopt
2016-04-22 22:00
@sheehan: correct me if i am wrong, but that means once i deployed my blockchain with the bucket configuration i am limited to the number of buckets which means the max nbr of states of all chaincodes?

sheehan
2016-04-22 22:01
the bucket configuration cannot be changed after the blockchain is deployed, but this imposes no limit on the number of states of all chaincodes. Each bucket can hold multiple keys and keys from different chaincodes can potentially live in a single bucket.

novusopt
2016-04-22 22:03
Thanks!

sheehan
2016-04-22 22:05
np

cmartis
2016-04-23 01:01
has joined #fabric

ashu
2016-04-23 04:08
has joined #fabric

jamie.steiner
2016-04-23 04:19
has joined #fabric

nits7sid
2016-04-23 14:13
has joined #fabric

nits7sid
2016-04-23 17:52
Hi.. When is the new block generated ?

muralisr
2016-04-23 17:53
@nits7sid: once consented upon each validator commits the block

nits7sid
2016-04-23 17:55
Ohh.. I make chaincode invocation call,it makes a transaction and that is recorded in the block..now what if I make the second invocation call. will that transaction be in the same Block?

muralisr
2016-04-23 17:57
it would depend upon consensus, timeliness etc... as a user you should not care or make assumptions on that

nits7sid
2016-04-23 17:59
ohh okay..thanks @muralisr

muralisr
2016-04-23 17:59
sure, anytime

nits7sid
2016-04-23 18:00
As per my use case I would want some transactions to reside in one block only. Can I make it possible ?

nits7sid
2016-04-23 18:01
either by pluging in custome consensus ?

muralisr
2016-04-23 18:06
if you were to work the system at that level, I’d think so … however that makes for … to say the least - constrained - … “blockchain"

latone
2016-04-24 00:38
has joined #fabric

ibmamnt
2016-04-25 00:37
@ghaskins: Thanks. I've put chaintool in my %PATH. https://hyperledgerproject.slack.com/archives/fabric/p1461360878000249

howardwu
2016-04-25 03:37
has joined #fabric

aaren
2016-04-25 06:52
has joined #fabric

ibmamnt
2016-04-25 09:08
I noticed about new client sdk (node.js) via > Merge pull request #1187 from angrbrd/client_sdk Looks like current implementation is for member services, but I also see some code related to chaincode Invoke/Query. I suspect this module might include most of peer rest api in the near future. Is this correct ? Not sure if Angry Bird monitor this channel or not. I also think we should remove Bluemix things (or make it Cloud Foundry and Docker aware module as cloud native app.

wimtobback
2016-04-25 11:38
has joined #fabric

karthik
2016-04-25 12:13
has joined #fabric

karthik
2016-04-25 12:20
can someone help me in the API documentation (APIs - CLI, REST, and Node.js - https://github.com/hyperledger/fabric/blob/master/docs/API/CoreAPI.md )

mcrafols
2016-04-25 13:05
start by reading it and then ask specific questions

karthik
2016-04-25 13:14
@mcrafols: I have been following the steps given, to setup the Swagger-UI. I ran into a error message "exit status 2 FAIL", when running go test -v -run TestServerOpenchain_API_GetBlockCount,

karthik
2016-04-25 13:18
I am accessing the peer in browser using - 127.0.0.1:5000. Can I use only this address to explore the apis or should I stick with swagger-ui or nodejs application(I have zero knowledge in both of them)

mcrafols
2016-04-25 13:19
I cannot help you with the Swagger-UI because I couldn't set it up either

mcrafols
2016-04-25 13:19
nodejs has a library which can be used


mcrafols
2016-04-25 13:20
but the problem is that I think it is not being updated with the hyperledger project

karthik
2016-04-25 13:21
What about this address 127.0.0.1:5000?

mcrafols
2016-04-25 13:22
what are you doing with it?

karthik
2016-04-25 13:25
I thought of interfacing the fabric with a simple html page by making a ajax call to this address

karthik
2016-04-25 13:27
My concern is that whether this a correct way of communicating with the fabric?

mcrafols
2016-04-25 13:28
I am not fully certain but I think that in this case you might want to use the REST API

mcrafols
2016-04-25 13:28
POST host:port/chaincode for instance

mcrafols
2016-04-25 13:29
being host the address of you VP and port is usually by default 5000

karthik
2016-04-25 13:35
This is a ajax call right. Can you give a example of this POST request?

mcrafols
2016-04-25 13:40
look for REST Endpoints in the link you posted

karthik
2016-04-25 13:45
OK , for example for the invole function - /devops/deploy needs to be used. could you give me an example like:- $.ajax({url: http://127.0.01:5000/devops/deploy/, data:data, type:POST}).

mcrafols
2016-04-25 14:01
I am sorry I can't help you further (not sure)

mcrafols
2016-04-25 14:01
but beware that devops/deploy is deprecated

karthik
2016-04-25 14:08
ok, thanks for your help

ghaskins
2016-04-25 14:20
@keithsmith: hi Keith, got a minute for a question about the SDK?

keithsmith
2016-04-25 15:08
Hi Greg … sure

keithsmith
2016-04-25 15:11
@ghaskins: Hi Greg, sure … what question?

jeffgarratt
2016-04-25 15:26
@keithsmith: the interface for the SDK can be found here https://github.com/hyperledger/fabric/blob/master/protos/fabric.proto#L123-L124

jeffgarratt
2016-04-25 15:26
meaning, the interface that I think the SDK impl would use to submit TXs

ghaskins
2016-04-25 15:59
@keithsmith: sorry, was on the phone

ghaskins
2016-04-25 16:00
my primary question is: is it usable as checked in to the HL repo? I tried it but got an exception from simply the require(‘hlc’)

ghaskins
2016-04-25 16:00
i suspect I am just not using it properly (I am not a nodejs guy)

ghaskins
2016-04-25 16:01
but I was curious if it was expected to work (at least to the level that test.js calls it) or is it just there as a preview

ghaskins
2016-04-25 16:01
i think part of the problem is that its not in npmjs yet, so I am not sure if I declared the dep properly in the package.json

ghaskins
2016-04-25 16:02
it seems transitive deps like grpc were not being found so the require blows up…like I said on the OBC slack, i suspect its 99% operator error on my part

ghaskins
2016-04-25 16:04
@ghaskins uploaded a file: https://hyperledgerproject.slack.com/files/ghaskins/F13FUD5UG/-.txt and commented: I was including it by path explicitly since its not in npmjs yet…I can see that npm-install does pull it locally into my node_modules but for some reason the transitives are not visible to the runtime

ghaskins
2016-04-25 16:04
so my question is: how are you guys using this today?

keithsmith
2016-04-25 16:06
Greg, try running “npm install .” from the sdk/node directory. Or did you already do that?

ghaskins
2016-04-25 16:22
I did that (I think, heh) but I can try again

ghaskins
2016-04-25 16:22
the deps are there, i think part of the problem is they are nested

ghaskins
2016-04-25 16:23
e.g. I see my-app/node_modules/hlc/node_modules/grpc

ghaskins
2016-04-25 16:23
and when I require(‘hlc’) its blowing up b/c it doesnt see grpc

ghaskins
2016-04-25 16:23
is this typically how it works (nested like that)?

ghaskins
2016-04-25 16:24
apologies, im sure these are nodejs noob level questions

kletkeman
2016-04-25 16:38
-- A quick question re NVP's and world state. After reviewing the protocol spec in great depth, and visiting every reference to non-validating or state, I cannot find out whether the NVP maintains a copy of the world state in addition to its copy of the blockchain. The reason I ask is that it would be very useful to deploy an NVP whose sole job it to service complex state queries for lightweight analytical purposes. But if NVPs don't have world state, then their usefulness would drop quite a bit I think ... (still nice to have NVPs handle apps and events, but not nearly as useful of taking the queries out of the VPs in very active systems) ...

simon
2016-04-25 16:39
i don't think that we really use NVPs at the moment

kletkeman
2016-04-25 16:39
we do

simon
2016-04-25 16:39
ah!

kletkeman
2016-04-25 16:39
as application gateways

simon
2016-04-25 16:39
it will not be able to maintain world state for confidential chaincode

kletkeman
2016-04-25 16:42
it is my understanding that the NVP is a subset of the VP, so would it not have the confidentiality code as well?

kletkeman
2016-04-25 16:42
but more importantly, since NVPs do not execute transaction, they would need to replicate world state from their connected VPs ...

kletkeman
2016-04-25 16:44
also, re security, we envision NVPs living inside corporate firewalls in some instances and thus having implicit security ... perhaps it should be possible to configure such an NVP with a default security level ...

muralisr
2016-04-25 16:47
@jeffgarratt might also be able to chime in on NVP and state ?

ghaskins
2016-04-25 16:48
@ghaskins uploaded a file: https://hyperledgerproject.slack.com/files/ghaskins/F13GHLMPT/screen_shot_2016-04-25_at_12.47.19_pm.png and commented: @keithsmith: “require(‘hlc’) from within electron UI…it might be a problem with electron’s ASAR interpretation of transitive deps

kletkeman
2016-04-25 16:50
thanks @muralisr

ghaskins
2016-04-25 17:28
@ibmamnt: fyi, i notice a bug in the chaintool code generator today (https://github.com/ghaskins/chaintool/commit/960696dbcbdea2df9aaa87c906936d1fee7e1406), ill cut a v0.5.1 update to address this

jeffgarratt
2016-04-25 18:07
@simon: @muralisr wrt to nvp, I believe the current thinking is that state is NOT replicated to nvps, only the blocks. For now, I do not think even blocks are replicated as of yet.

simon
2016-04-25 18:07
right, that's what i thought

simon
2016-04-25 18:07
but you could as well

jeffgarratt
2016-04-25 18:08
yes, the parts are in place to support it

simon
2016-04-25 18:09
and right, an operator may configure their NVP with encryption keys so that the NVP can also read confidential state

kletkeman
2016-04-25 18:21
@jeffgarratt: thanks ... the protocol spec says that NVPs maintain a copy of the blockchain, but this is actually of less use than maintaining a copy of world state as application gateways would be tremendously useful for offloading state queries ... any chance that world state will eventually get copied to NVPs?

jeffgarratt
2016-04-25 18:23
@kletkeman: the current issue is that state is interpreted relative to chaincode, and queries today go through chaincode themselves.

jeffgarratt
2016-04-25 18:25
I don't think it is technically infeasible, but the form of the state values if chaincode dependent, ie. the state is simply bytes, and the reader of the state would need to have internal knowledge of the storage.

jeffgarratt
2016-04-25 18:25
basically, wrt to any chance question, yes. But I think we need to approach carefully wrt the privacy.

kletkeman
2016-04-25 18:27
@jeffgarratt: I have been labouring under the impression that the protocol spec says that NVPs are a proper subset of VPs for a reason ... as in they run chaincode (after VPs validate of course) for queries (but not invokes) and they maintain world state as replicated copies ... but if they don't run chaincode and they don't maintain state then they are a rather small subset of a VP ...

kletkeman
2016-04-25 18:29
i.e. I have been viewing NVPs as a VP without consensus rights

kletkeman
2016-04-25 18:29
but that was clearly way off base

jeffgarratt
2016-04-25 18:30
at least for the current implementation

jeffgarratt
2016-04-25 18:30
but I do not think your are far from the target

jeffgarratt
2016-04-25 18:30
wrt to your expectations

jeffgarratt
2016-04-25 18:31
and the specs statements :simple_smile:

kletkeman
2016-04-25 18:31
ah ... ok ... so I'm not hallucinating :simple_smile:

jeffgarratt
2016-04-25 18:31
no, well.... not wrt to this :simple_smile:

kletkeman
2016-04-25 18:32
I'll put in a disclaimer in my sample contract docs then ... "evolving blah blah blah" ...

kletkeman
2016-04-25 18:32
thanks!

ghaskins
2016-04-25 19:23
is the API for membership services documented anywhere ?

fabio
2016-04-25 20:54
has joined #fabric


mcrafols
2016-04-26 08:53
Although the examples are more helpful:


mcrafols
2016-04-26 08:54
I think they are working on making the API...

mcrafols
2016-04-26 08:55
I am trying to deploy a chaincode that is not on github. I have not been succesful finding my chaincode.go in the filesystem by setting "path":"http://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02"

mcrafols
2016-04-26 08:56
I am no sure where should the chaincode go so the REST post can find it (is it possible without using github?)

daniels
2016-04-26 09:46
has joined #fabric

ghaskins
2016-04-26 11:23
@mcrafols: thanks!

ghaskins
2016-04-26 11:24
Regarding your problem, note that your only two choices today are 1) put it on github or 2) put it on your (N)VP file system under $GOPATH/src

ghaskins
2016-04-26 11:25
Can you confirm how you were doing (2)?

ghaskins
2016-04-26 11:26
Fwiw I'm working on a third option (specify the payload inline to the request) but it's not ready yet

mcrafols
2016-04-26 11:27
I see

mcrafols
2016-04-26 11:27
I had problems downloading it from github (keep saying it couldn't download it)

mcrafols
2016-04-26 11:27
for the marbles case

mcrafols
2016-04-26 11:28
and I didn't know where to put the chaincode so the VP could access it

ghaskins
2016-04-26 11:28
Ah, not sure. I've been primarily living in devmode

ghaskins
2016-04-26 11:29
Yeah, it's a little vague but the path needs to be relative to the receiving (N)VPs $GOPATH

mcrafols
2016-04-26 11:29
$GOPATH or $GOPATH/src

ghaskins
2016-04-26 11:30
Latter

ghaskins
2016-04-26 11:30
I was generalizing, sorry

mcrafols
2016-04-26 11:30
so path should be something like ./cc.go

mcrafols
2016-04-26 11:30
?

ghaskins
2016-04-26 11:30
No, just package I think

mcrafols
2016-04-26 11:30
okay I can try both

ghaskins
2016-04-26 11:31
So "foo" for $GOPATH/src/foo/cc.go

ghaskins
2016-04-26 11:31
I think, heh

ghaskins
2016-04-26 11:31
Yeah, trying both is best bet

mcrafols
2016-04-26 11:32
thanks!

ghaskins
2016-04-26 11:32
Np, good luck, and thanks for Api pointer

mrshah
2016-04-26 13:09
has joined #fabric

mcrafols
2016-04-26 14:54
Hi! I was trying to use the REST API to inspect the blockchain in a VP and it returns this error

mcrafols
2016-04-26 14:54
proto: protos.ChaincodeDeploymentSpec: wiretype end group for non-group

mcrafols
2016-04-26 16:21
anyone know what could be happening?

jzhang
2016-04-26 17:49
has joined #fabric

ghaskins
2016-04-26 20:38
@keithsmith: make sense to create a fabric-sdk channel?

ghaskins
2016-04-26 20:39
@keithsmith: i had a question about the registrar concept

jonathanlevi
2016-04-26 20:41
@ghaskins, @keithsmith: I think so. Makes sense to me.

ghaskins
2016-04-26 20:43
# created

uramoto
2016-04-27 01:33
has joined #fabric

harry96
2016-04-27 03:10
Question, Do we have any starting point (regular meeting or documents or work product) to refer? I just join the slack

yingfeng
2016-04-27 03:20
has joined #fabric

yingfeng
2016-04-27 03:21
Question, Is it possible for fabric to support bridge currency(something like ripple XRP), such as some kinds of asset exchange could be set up using fabric?

elliot
2016-04-27 05:13
has joined #fabric

simon
2016-04-27 06:59
yingfeng: i think you could just introduce some sort of intermediate currency

erictsang
2016-04-27 07:22
has joined #fabric


ibmamnt
2016-04-27 07:44
Probably easier to run local swagger server to just take a look. Note this does not support local api calls to actual peer.

lfeagan
2016-04-27 08:04
has joined #fabric

andyz
2016-04-27 08:16
has joined #fabric

mcrafols
2016-04-27 08:22
Hi, I am trying to deploy a chaincode and the peer where gives this error

mcrafols
2016-04-27 08:23
08:08:51.379 [ledger] sendProducerBlockEvent -> ERRO b3c Error unmarshalling dep loyment transaction for block event: proto: protos.ChaincodeDeploymentSpec: wire type end group for non-group

simon
2016-04-27 08:24
sounds like a version missmatch

simon
2016-04-27 08:24
do all peers run the same code?

mcrafols
2016-04-27 08:25
yes

mcrafols
2016-04-27 08:25
version of what?

mcrafols
2016-04-27 08:26
I mean, the chaincode has some libraries that may be outdated?

mcrafols
2016-04-27 08:28
I am trying to deploy the Marbles chaincode


mcrafols
2016-04-27 08:28
on the OBC

mcrafols
2016-04-27 08:29
actually I tried on HyperLedger and updating the chaincode but still didn't work

j3ffyang
2016-04-27 09:32
has joined #fabric

muralisr
2016-04-27 11:05
@mcrafols: sounds like you are seeing this issue https://github.com/hyperledger/fabric/issues/1204

muralisr
2016-04-27 11:06
it should really be benign if you are not using events…. ie, if you are having any other problem it’s likely not related to this error

mcrafols
2016-04-27 11:09
its probably it because if I remove the CA everything works fine

mcrafols
2016-04-27 11:10
I am trying to set up locally the marbles app and it probably uses events

mcrafols
2016-04-27 11:11
but even if I don't use events, I cannot retrieve the information in the block where such chaincode is stored

mcrafols
2016-04-27 11:12
(using the ...:5000/chain/blocks/1)

mcrafols
2016-04-27 11:16
@muralisr: is this related to the chaincode itself? Or it always happen if Privacy is enabled?

muralisr
2016-04-27 11:26
@mcrafols: the error itself happens when the system attempts to remove the large deployment image before sending it out as an event - and fails because of encryption. The event is still sent but with the large deployment image

muralisr
2016-04-27 11:29
If your deployment fails I’d expect other errors before the sendProducerBlockEvent error

mcrafols
2016-04-27 12:39
@muralisr: but then checking the blockchain through the REST API is considered an event?

muralisr
2016-04-27 12:40
@mcrafols: no, REST API do not go through the event framework.

muralisr
2016-04-27 12:41
I mean currently of course.

mcrafols
2016-04-27 12:41
well, I am seeing this error when using the REST API too

muralisr
2016-04-27 12:43
ok. did the deploy itself work ? I’m trying to understand the root issue

mcrafols
2016-04-27 12:43
yes it did

mcrafols
2016-04-27 12:44
the blocks are updated properly

mcrafols
2016-04-27 12:44
but I cannot access the block where the deploy transaction is stored

muralisr
2016-04-27 12:44
ok

muralisr
2016-04-27 12:45
what REST API are you using ?

mcrafols
2016-04-27 12:45
hyperledger?

muralisr
2016-04-27 12:47
I meant the specific REST API … I was not sure if going through marbles has a set of apis too

mcrafols
2016-04-27 12:47
oh

mcrafols
2016-04-27 12:47
I wasn't sure of you question

muralisr
2016-04-27 12:47
sure, np

mcrafols
2016-04-27 12:47
well actually I tried it without marbles

mcrafols
2016-04-27 12:47
just setting up a dev network

mcrafols
2016-04-27 12:48
allow me to reproduce it and I'll explain the steps I have taken

muralisr
2016-04-27 12:48
great, that works

mcrafols
2016-04-27 13:18
@muralisr: I can't figure out how I generated the error.. if it ever happens again I'll update you

mcrafols
2016-04-27 13:18
thanks

muralisr
2016-04-27 13:19
sure thing

mcrafols
2016-04-27 13:19
:sweat_smile:

alex.oberhauser
2016-04-27 13:20
has joined #fabric

alex.oberhauser
2016-04-27 13:23
Hi . Has someone experience with the transition from Ethereum smart contracts to Hyperledger chaincode? As far as I have seen from the examples they share the underlying core concepts. Please correct me if I am wrong.

aditya
2016-04-27 13:25
+1 great question, we are trying to achieve the reverse transition.

martindale
2016-04-27 13:37
@alex.oberhauser: you might be interested in Rootstock, which allows Ethereum contracts to be compiled directly into a Bitcoin-backed sidechain: http://www.rootstock.io/

kletkeman
2016-04-27 13:37
The documentation for Solidity (Ethereum's contract language with similarities to JS syntax) is at http://solidity.readthedocs.org/en/latest/introduction-to-smart-contracts.html#simple-smart-contract Solidity contracts run on the Ethereum Virtual Machine and so there is the first major difference. Still, a lot of the basic facilities of EVM have parallels in Hyperledger I imagine. Looking at the examples in those docs, it is pretty easy to see how one would transcribe from Solidity to Go, but of course these do not make use of the advanced features of EVM.

jatinderbali
2016-04-27 13:45
Check http://etherscripter.com Maybe a enhancement to their tool will do the job.

jzhang
2016-04-27 14:59
using docker-compose to manually launch 3 peers using the yaml files under bddtests, i don’t see port forwarding mappings, how do i figure out what ports to use to contact the peers?

jzhang
2016-04-27 15:00
the behave tests seems to suggest that using the yaml files with docker-compose i should be able to contact the peers with paths like http://<ip>:<port/network/peers

simon
2016-04-27 15:01
yes, i think so

jzhang
2016-04-27 15:02
but using “docker inspect” i don’t see port exposed

jzhang
2016-04-27 15:02
am i missing something?

jeffgarratt
2016-04-27 15:03
@jzhang: the ports are NOT exposed, rather you can refer to the peers with there dockerCompose service name

jeffgarratt
2016-04-27 15:03
from the behave tests themselves

jeffgarratt
2016-04-27 15:04
@jzhang: what are you trying to perform that you cannot, and perhaps I can help you or modify the system if there is a deficiency

jeffgarratt
2016-04-27 15:05
@jzhang: and you can refer to the docker-compose-default.yaml for the default port for all VPs


jzhang
2016-04-27 15:05
so this step suggests that i should be able to contact the peer via http right?

jzhang
2016-04-27 15:06
looking at compose-defaults.yaml: vp: image: hyperledger-peer environment: - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=http://172.17.0.1:4243 # TODO: This is currently required due to BUG in variant logic based upon log level. - CORE_LOGGING_LEVEL=DEBUG command: peer peer

jzhang
2016-04-27 15:07
not sure what I should use as the port from the host to contact the peer

jeffgarratt
2016-04-27 15:07
sorry, the setting is default per peer.address setting to 0.0.0.0:30303

jeffgarratt
2016-04-27 15:07
that is the GRPC port

jeffgarratt
2016-04-27 15:07
the HTTP port is 5000

jzhang
2016-04-27 15:07
aha 5000 works!

jzhang
2016-04-27 15:07
but where is that configured?

jeffgarratt
2016-04-27 15:08
>/peer/core.yaml

jeffgarratt
2016-04-27 15:08
sorry, I thought you meant at the vagrant level

jeffgarratt
2016-04-27 15:08
or I should say, from docker container to vagrant

jzhang
2016-04-27 15:09
the other way around :simple_smile:


jzhang
2016-04-27 15:09
this works now. thanks for the pointers Jeff

jeffgarratt
2016-04-27 15:09
np :simple_smile:


bcbrock
2016-04-27 15:38
has joined #fabric

jzhang
2016-04-27 15:50
thanks @mcrafols for the reminder, will try to use the SO for future questions to benefit the community

mcrafols
2016-04-27 15:50
well because usually questions require several question and answers it is great using slack

mcrafols
2016-04-27 15:51
but if you could just upload what you figured out yourself (so everybody will use what you've learned)!

mcrafols
2016-04-27 15:51
@jzhang: thanks!


ijmitch
2016-04-27 21:14
has joined #fabric

alex.oberhauser
2016-04-27 22:25
@martindale: Thank you for the link.

ibmamnt
2016-04-28 02:53
Where should I give some feedback on Hyperledger fabric ? Is this good channel ? For example, I invoke a chaincode to do some transaction, and then immediately query on worldstate gives me this error: ```Query chaincode result: {"jsonrpc":"2.0","error":{"code":-32003,"message":"Query failure","data":"Error when querying chaincode: Error:Failed to launch chaincode spec(Could not get deployment transaction for f94be74d5e8eaa1771642831198cf460486457ce96d765b552613040d4c095514c3dbb73c9d2c3fb743de570af8d463dcafb56683d3f32c4a49d597cea2676ad - ledger: resource not found)"},"id":5}``` Or do we have any list of error code ? The purpose is to develop front end application such that it knows about the status of transaction, and UI can show like "Processing transaction, please try later ..." or something like this.

ibmamnt
2016-04-28 02:54
Note transactions are processed, and if I wait a while, I can query those result.

sheehan
2016-04-28 02:59
@ibmamnt: Lots of discussion at https://github.com/hyperledger/fabric/issues/588

ibmamnt
2016-04-28 03:04
@sheehan: Thanks. I have subscribed to the issue. In the meantime, I'll put wait or poll transaction. I think this is sufficient for the demo purpose.

yingfeng
2016-04-28 07:27
Is there any example to use fabric for order book matching via bridge currencies like XRP in ripple ?

shannoncode
2016-04-28 14:11
has joined #fabric

ghaskins
2016-04-28 16:21
has anyone seen this travis failure before? It doesnt seem to be actually related to my PR but I’ve also never seen it: https://travis-ci.org/hyperledger/fabric/builds/126407700

louie.stavrakos
2016-04-28 17:36
has joined #fabric

igor
2016-04-29 11:15
has joined #fabric

posnerj
2016-04-29 15:07
has joined #fabric

jeremyeder
2016-04-29 15:28
has joined #fabric

jeremyeder
2016-04-29 15:29
@tuand: @wkulhanek_ibm around?

tuand
2016-04-29 15:29
what's up ?

ristoalas
2016-04-29 22:01
has joined #fabric

canedy
2016-04-29 22:51
has joined #fabric

grapebaba
2016-05-01 09:58
i feel the command ./peer peer is strange, why not just use. /peer run or ./peer start

sheehan
2016-05-01 11:14
@grapebaba: you’re not the only one :simple_smile: discussion at https://github.com/hyperledger/fabric/issues/1158

ghaskins
2016-05-01 12:00
Was just reviewing unrelated code when I noticed this: https://github.com/hyperledger/fabric/blob/master/core/chaincode/config.go#L77

ghaskins
2016-05-01 12:00
shouldn’t that be runtime.GOMAXPROCS(numProcsDesired)?

ghaskins
2016-05-01 12:01
that pattern repeats a few times too, fwiw

grapebaba
2016-05-01 13:57
@sheehan:got it

bartcant
2016-05-02 04:57
has joined #fabric

jeremyeder
2016-05-02 12:22
hey -- is anyone from IBM working on packaging for Fabric? If so, who would that be?

simon
2016-05-02 12:23
what do you mean by packaging?

simon
2016-05-02 12:23
rpm/deb stuff?

simon
2016-05-02 12:24
I don't think this is being worked on

tuand
2016-05-02 12:45
@jeremyeder: check with @bmos299 first

bmos299
2016-05-02 12:45
has joined #fabric

jeremyeder
2016-05-02 12:46
@simon yep, that. @bmos299 do you know if anyone is working on packaging for Fabric?

sheehan
2016-05-02 12:52
@jeremyeder: @ghaskins: (not from IBM) has been the lead committer in this area. I don’t think he has investigated packaging the fabric, but he has looked into packaging some of its dependencies. He also did most of the base image work. https://github.com/hyperledger/fabric/tree/master/devenv/baseimage You’ll want to get his advice/input for any packaging work

sheehan
2016-05-02 12:54
ah, see you already connected on the mailing list :simple_smile:

jeremyeder
2016-05-02 12:59
@sheehan: seems so, yep. thanks!

takekiyokubo
2016-05-02 13:45
has joined #fabric

ghaskins
2016-05-02 14:05
@jeremyeder: howdy, this is probably more convenient than the ML

jeremyeder
2016-05-02 14:06
ah, hey @ghaskins how are you

ghaskins
2016-05-02 14:06
good thanks

ghaskins
2016-05-02 14:06
speaking of packaging, that effort I mentioned was my first foray into launchpad based packaging…prior to that I was using the opensuse build service

ghaskins
2016-05-02 14:07
i wasnt a huge fan of the way the launchpad service worked in comparison to the suse engine, but seeing you work for RH perhaps there is a third option to consider?

jeremyeder
2016-05-02 14:07
@ghaskins: great -- ah yeah, you'll have to excuse me, i am not familiar with PPA etc

ghaskins
2016-05-02 14:08
that rocks packaging was my first time really using it myself

ghaskins
2016-05-02 14:08
ive done a ton of packaging work under the suse engine, that was just my first time using launchpad

ghaskins
2016-05-02 14:09
I just saw your renaming question: yes that is indeed the intent

jeremyeder
2016-05-02 14:10
@ghaskins: yeah as you can imagine. fedora, centos, rhel have equivalents

ghaskins
2016-05-02 14:10
the reason the docker side lagged is because I initially didnt have access to the “hyperledger” namespace in dockerhub

ghaskins
2016-05-02 14:10
but that was resolved a week or two ago, and its on my todo list

ghaskins
2016-05-02 14:10
yeah, i would imagine that is the case

jeremyeder
2016-05-02 14:11
@ghaskins: ah cool. do you have any interest in allowing a conditional somewhere in the packer stuff to allow for centos- or fedora-based build artifacts?

ghaskins
2016-05-02 14:11
i know the opensuse engine can generate artifacts for all the major distros, which is a nice feature I am not sure is replicated everywhere

ghaskins
2016-05-02 14:12
i personally maintain packages for RH/Suse/Ubuntu in there

ghaskins
2016-05-02 14:12
@jeremyeder: of course!

ghaskins
2016-05-02 14:12
if you have a proposal on how to integrate other platforms, i am totally open to that

ghaskins
2016-05-02 14:14
to be honest, i am not married to packer either….it was a proposal I made to try to unify vagrant+docker generation, but there might be other ways to achieve the same

jeremyeder
2016-05-02 14:14
yeah, same here wrt packer.

ghaskins
2016-05-02 14:14
i think the core requirement is to try to unify the generation of the images one way or the other from one source of truth

jeremyeder
2016-05-02 14:14
nod

ghaskins
2016-05-02 14:14
how we get there, i dont have a strong opinion as long as its reasonable

cbf
2016-05-02 14:14
@jeremyeder: we’d want to ensure that the CI incorporates alternate OS (and platform) builds (eg X, open power, Z/Linux, ARM, FPGA, etc)

jeremyeder
2016-05-02 14:15
@cbf: yep. understood. the challenge is that most distro build infras are not supporting all different packaging formats equally (probably why packer exists)

cbf
2016-05-02 14:16
d'accord

jeremyeder
2016-05-02 14:16
this is why i was questioning what the ultimate delivery mechanism will be for customers who want to use Fabric. will it be a container image or not.

cbf
2016-05-02 14:17
I would assume so

ghaskins
2016-05-02 14:17
thats def a question for @cbf etc…my motivation for involvement to date was w.r.t. reducing the overhead of iterative development builds

cbf
2016-05-02 14:17
certainly don’t see vagrant as being anything more than a convenience for developers

ghaskins
2016-05-02 14:17
not so much looking at production delivery vehicles (though I understand there can be a correlation/overlap)

ghaskins
2016-05-02 14:19
my guess is this will end up looking like other FOSS projects like openstack: there will be one upstream community supported platform and then the distros will package it up as appropriate for the different flavors

cbf
2016-05-02 14:20
@ghaskins: that’s in line with what I would hope we’d get to

ghaskins
2016-05-02 14:22
@jeremyeder: one task I have for the immediate future is to get the openblockchain/baseimage dockerhub available under hyperledger with additional provisions for $arch

ghaskins
2016-05-02 14:22
the current thought is this will be addressed with tags like :$arch-$version

jeremyeder
2016-05-02 14:22
@ghaskins: i see -- cool.

jeremyeder
2016-05-02 14:22
@cbf

jeremyeder
2016-05-02 14:22
woops.

ghaskins
2016-05-02 14:22
e.g. hyperledger/fabric-baseimage:x86_64-0.0.9

ghaskins
2016-05-02 14:23
then we can represent others like ppcle or s390 in a similar namespace

ghaskins
2016-05-02 14:23
but those would still be ubuntu, probably

ghaskins
2016-05-02 14:23
not sure how distro flavor might roll into that, input welcome

jeremyeder
2016-05-02 14:23
@cbf there are serveral assumptions being made in the existing devenv stack, im just seeing if i can wire in fedora/rhel in there.

ghaskins
2016-05-02 14:24
one question is: are you trying to get a RH base throughout (devenv and docker)? or just for the fabric environment

jeremyeder
2016-05-02 14:24
@ghaskins: right, and thats of course my question too :simple_smile:

cbf
2016-05-02 14:24
@jeremyeder: I’m all for having broader OS support

ghaskins
2016-05-02 14:25
to put it another way, do you need/care to have the docker be RH too, or is it ok as long as fabric can be deployed on RH

ghaskins
2016-05-02 14:25
(to be clear, i am not against either model, just trying to understand your goals)

jeremyeder
2016-05-02 14:25
@ghaskins: @cbf ahh. so first step is to just get openblockchain/baseimage deployed on openshift. ill do that today.

cbf
2016-05-02 14:26
:wink:

jeremyeder
2016-05-02 14:26
and then, as you can expect we would like to be considered as an option for the baseimage, with the version tags as you mentioned (there are several existing examples of this already)

ghaskins
2016-05-02 14:27
if you have some examples of how distro/arch things are handled within docker, pls share

cbf
2016-05-02 14:27
@jeremyeder: I think that it would be slick to demonstrate not just OS but k8s

jeremyeder
2016-05-02 14:27
nvidia does this for their cuda stack: docker pull nvidia/cuda:{centos,ubuntu}

cbf
2016-05-02 14:27
would assume there’s much overlap (if not complete)

ghaskins
2016-05-02 14:28
ah, so perhaps the tags should be like :$distro-$arch-$version ?

jeremyeder
2016-05-02 14:28
cbf: openshift is extremely close to k8s, id argue if it doesnt work on kube then its a bug

ghaskins
2016-05-02 14:29
i guess one question, particularly to @cbf and the TSC: would you like to see the “hyperledger” namespace reflect all distro variations as per above, or would we recommend it be handled as a sep namespace (ala “nvidia”)

ghaskins
2016-05-02 14:30
i could see it going either way

ghaskins
2016-05-02 14:30
it could be RH flavor of hyperledger references a different dockerhub (e.g. “redhat/*”)

cbf
2016-05-02 14:31
I think that all depends on who maintains the image, yes?

ghaskins
2016-05-02 14:31
my only thought is w.r.t. permissions/access to the hyperledger namespace, as well as potential crowding

ghaskins
2016-05-02 14:32
yes that is certainly true

jeremyeder
2016-05-02 14:33
well, red hat would maintain the fedora, centos and rhel images. but we would not maintain the Fabric image itself -- we would work that through our normal ISV partnership programs

jeremyeder
2016-05-02 14:35
ive been playing with this myself

jeremyeder
2016-05-02 14:35
i have a Dockerfile called c7perf on dockerhub which is based on the centos image. i just install a few extra tools on top of the centos image.

jeremyeder
2016-05-02 14:35
there are places for github hooks so when i change the c7perf Dockerfile in my github, dockerhub will rebuild c7perf image automatically

jeremyeder
2016-05-02 14:36
@ghaskins: what if we did somethins similar for Fabric -- when a Dockerfile is updated in the Master branch (or -stable?) then dockerhub rebuilds the image automatically?

jeremyeder
2016-05-02 14:36
@cbf

ghaskins
2016-05-02 14:37
@jeremyeder: thats probably tenable if integrated into some kind of CI trigger

jeremyeder
2016-05-02 14:37
yep, i guess when it sees a new "stable" tag

jeremyeder
2016-05-02 14:37
it == dockerhub

ghaskins
2016-05-02 14:37
right now, we only push the “baseimage” which changes infrequently based on the scripts under ./devenv/baseimage

ghaskins
2016-05-02 14:38
it could certainly be a trigger based on changes there, or whatever else is appropriate

ghaskins
2016-05-02 14:39
one problem that needs to be solved generally is version coupling

ghaskins
2016-05-02 14:39
right now, the notion that baseimage-v0.0.9 is current is spread out in a few different places

ghaskins
2016-05-02 14:40
the devenv/Vagrantfile and .travis.yml files come to mind, there may be others

ghaskins
2016-05-02 14:40
any time there is a new baseimage, we need to push the images out to atlas (vagrant) and dockerhub, and then update those two files

ghaskins
2016-05-02 14:41
the notion of rolling forward to a new release would have to unify and/or incorporate that notion

ghaskins
2016-05-02 14:42
not specifically related to your CI-based proposal, but I would love it if at least the definition were in one place (e.g. “./version.dat”) that the Vagrantfile and travis (and anything else that needed it) could draw from

jeremyeder
2016-05-02 14:43
oh

jeremyeder
2016-05-02 14:43
thats got to be taken from the fabric code somewhere, like a github tag, no?

ghaskins
2016-05-02 14:43
well, thats a different matter

ghaskins
2016-05-02 14:44
we _need_ to be creating github tags for the baseimage releases, but to date have not

jeremyeder
2016-05-02 14:44
oh

ghaskins
2016-05-02 14:44

jeremyeder
2016-05-02 14:45
ok. there have to be release tags for fabric and then all the build artifacts can be sure of what they're using


ghaskins
2016-05-02 14:46
i agree, I lobbied for that but lack the access to create the tags

ghaskins
2016-05-02 14:46
so it just was lost in the shuffle

jeremyeder
2016-05-02 14:46
ok -- where's your lobbying? i would also pile on :simple_smile:

ghaskins
2016-05-02 14:46
probably just on slack

ghaskins
2016-05-02 14:47
i dont think it was dropped out of disagreement

jeremyeder
2016-05-02 14:47
gotcha, let me file something.

ghaskins
2016-05-02 14:47
just wasnt a priority to be seen through to completion

ghaskins
2016-05-02 14:47
one annoying thing with github is it doesnt seem you can submit tags as a PR

ghaskins
2016-05-02 14:48
otherwise, I would have done that along with the code PRs

ghaskins
2016-05-02 14:48
IIUC it requires someone with write access to push them

jeremyeder
2016-05-02 14:49
theres one tag now

jeremyeder
2016-05-02 14:49
0.1.0

ghaskins
2016-05-02 14:49
yeah, i am not even sure what that was

ghaskins
2016-05-02 14:50
in this context, I would have done something like “baseimage-v0.0.9” to correlate to whats in dockerhub now

jeremyeder
2016-05-02 14:51
nod

jeremyeder
2016-05-02 14:51
let me just file an issue on github and see what comes back

ghaskins
2016-05-02 14:52
but anyway, the basic workflow is something like make changes to devenv/baseimage, push it to vagrant/dockerhub, update devenv/Vagrantfile and .travis.yml to reference new version, tag it in github as baseimage-$version

ghaskins
2016-05-02 14:53
any improvements welcome, with particular interest in unifying the Vagrantfile/travis version into something any subsystem may consume, and actually getting the tags created :wink:

ghaskins
2016-05-02 14:56
@cbf: IIUC there is some kind of formal CI effort being investigated now?

ghaskins
2016-05-02 14:56
I am thinking that whole thing above could be tied in there,

jeremyeder
2016-05-02 14:57

ghaskins
2016-05-02 14:59
@jeremyeder: i am not sure I am misunderstanding, but from your description it almost seems like dockerhub itself can rebuild the image?

jeremyeder
2016-05-02 15:00
yep!

ghaskins
2016-05-02 15:00
thats really cool, was not aware

ghaskins
2016-05-02 15:00
I was building the images locally and pushing up

jeremyeder
2016-05-02 15:01
yeah so it will watch for a new tag

jeremyeder
2016-05-02 15:01
here let me show you

ghaskins
2016-05-02 15:01
actually for a brief moment, I was using the Packer Build service in Atlas to cloud-build both vagrant and docker, but they have since made that a premium service that isnt free

jeremyeder
2016-05-02 15:10
ghaskins: ok so

jeremyeder
2016-05-02 15:10
i just merged a new pR

jeremyeder
2016-05-02 15:13

cbf
2016-05-02 15:15
@ghaskins: yes, see my discussion in the # channel - let me get the link


cbf
2016-05-02 15:17
@muralisr: you might be interested in the discussion above between @ghaskins and @jeremyeder

muralisr
2016-05-02 15:18
thanks @cbf

ghaskins
2016-05-02 15:38
@jeremyeder: IIUC you were trying to show me an example of your build-trigger but hit a bug?

jeremyeder
2016-05-02 15:49
ghaskins: yeah, i moved the github repo to a different github org

jeremyeder
2016-05-02 15:49
dockerhub does not allow you to change the source repo without creating a new automated build

ghaskins
2016-05-02 15:49
ah

ghaskins
2016-05-02 15:50
i assume you are exploiting a webhook? https://docs.docker.com/docker-hub/webhooks/

ghaskins
2016-05-02 15:52
thats cool, didn’t know we could do that

jeremyeder
2016-05-02 16:01

jeremyeder
2016-05-02 16:01
i just created a new automated build from the new org, and it built the image. then i pushed a small change to the dockerfile, and dockerhub saw that and is rebuilding the container now.

ghaskins
2016-05-02 16:02
yep, very cool

ghaskins
2016-05-02 16:03
so, if you could figure out a way to have vagrantfile/travis consume their version from something like git-revparse and have the builds triggered by the git-push, that would be +100 from my perspective

ghaskins
2016-05-02 16:04
i assume that the dockerhub build might be $arch opinionated/limited however, so we would still need a strategy for that

joseph
2016-05-02 16:04
Hi

jeremyeder
2016-05-02 16:04
hm

ghaskins
2016-05-02 16:05
@jeremyeder: actually, even just having a file checked in like ./version -> “0.0.9” would be a huge improvement if the revparse was too difficult to stablize

jeremyeder
2016-05-02 16:06
@ghaskins: i think we need to hear from binh q nguyen

jeremyeder
2016-05-02 16:06
he looks to be committing those type of things to git.

ghaskins
2016-05-02 16:06
of course, i dont have commit privs myself anyway :wink:

jeremyeder
2016-05-02 16:06
@binhn: ping :simple_smile:

ghaskins
2016-05-02 16:07
i would just adamantly support such a PR

joseph
2016-05-02 16:07
I want to create a NVP on the following network so I can use REST service https://github.com/hyperledger/fabric/blob/master/docs/dev-setup/devnet-setup.md.

joseph
2016-05-02 16:08
Could you give me some ideas?

cbf
2016-05-02 20:15
@sheehan: is doing yoman’s work on the backlog of PRs… thanks!

sheehan
2016-05-02 20:20
heh, np. Sorry they got back up and apologies to those who have to rebase. I will post here (likely late tonight) when I am done merging the PRs without issues if folks want to wait to start on their rebase.

suma
2016-05-02 21:14
has joined #fabric

cbf
2016-05-02 21:16
@sheehan: LMK how you want to handle https://github.com/hyperledger/fabric/pull/1297

cbf
2016-05-02 21:17
it now repeatedly fails to build, despite the fact that I didn’t change anything but the license headers

sheehan
2016-05-02 21:17
yeah, please wait on that one. Once I clear out most PRs, I’ll let you know and we can try to coordinate a quick PR/accept to avoid conflicts

cbf
2016-05-02 21:17
+1

ghaskins
2016-05-02 21:19
FYI, we are working on a fix for the travis failure related to the unit test in platforms/car

cbf
2016-05-02 21:20
that’s one that is affecting me

ghaskins
2016-05-02 21:20
it seems that the PR that introduced the unit-test failure was masked by a travis-infrastructure bug that gave a false positive

cbf
2016-05-02 21:20
thanks for letting me know it’s not me;-)

ghaskins
2016-05-02 21:20
nope, testing a fix now

ghaskins
2016-05-02 21:21
i think the travis failure is a red-herring, its because travis is missing a dep…the unit test passes otherwise which is how it got past

ghaskins
2016-05-02 21:21
but sorry for the noise

cbf
2016-05-02 21:21
np

ghaskins
2016-05-02 21:29

ghaskins
2016-05-02 22:02
@ghaskins uploaded a file: https://hyperledgerproject.slack.com/files/ghaskins/F15GU12EQ/-.txt and commented: Anyone see this before?

tuand
2016-05-02 22:05
have not seen this error before ... what line in .feature file was it trying to execute ?

tuand
2016-05-02 22:11
nvm , i see it `../peer/peer stop`

tuand
2016-05-02 22:12
looks like it can't find the peer executable but should have run into the same thing on start up ?

sheehan
2016-05-02 22:13

tuand
2016-05-02 22:16
possible ? although we should've have seen the same error when the peer is started ... maybe something in the behave python code or the docker-compose files

kurtz
2016-05-02 22:18
has joined #fabric

sheehan
2016-05-02 22:19
@ghaskins: do you see the error if you stop the peer before running the behave tests?

ghaskins
2016-05-02 22:19
let me try

ghaskins
2016-05-02 22:20
that was weird, now its working

ghaskins
2016-05-02 22:21
@sheehan: as far as I know, the peer wasnt running earlier either

ghaskins
2016-05-02 22:21
but now, it works

ghaskins
2016-05-02 22:21
or at least, the behave tests are running

sheehan
2016-05-02 22:22
what OS?

ghaskins
2016-05-02 22:22
vagrant-devenv on OSX

ghaskins
2016-05-02 22:22
still trying to sort out the travis snafu

ghaskins
2016-05-02 23:45
@sheehan: so far PR #1329 looks like a suitable stop-gap to stop the travis failures

sheehan
2016-05-02 23:46
thanks, will take a look shortly after I’m done with the current PR I’m looking at

ghaskins
2016-05-02 23:46
sure, note that any PRs based after PR1320 and before whenever you accept 1329 will likely need to rebase if you want to see travis pass before mergibng

ghaskins
2016-05-02 23:47
of course, hand testing them may be sufficient too if you are already running those

ghaskins
2016-05-02 23:47
sorry for the noise

sheehan
2016-05-03 00:07
thanks @ghaskins! merged

cbf
2016-05-03 00:16
thanks @ghaskins !


grapebaba
2016-05-03 06:10
hi

grapebaba
2016-05-03 06:11
i test /registrar/enrollid/tcert api

grapebaba
2016-05-03 06:12
it will return a array in response OK field

grapebaba
2016-05-03 06:12
is it expected result or a bug?

gengjh
2016-05-03 06:30
I think it works as design, since we support multiple transaction certification


gengjh
2016-05-03 06:31
Issues transaction certificates (TCerts) to ECert owners. An infinite number of TCerts can be derived from each ECert. TCerts are used by network participants to send transactions. Depending on the level of security requirements, network participants may choose to use a new TCert for every transaction.

aaren
2016-05-03 06:37
@ghaskins I am try deploy Hyperledger chaincode on PPC64LE, it seem it depend on openblockchain/baseimage , where can pull this image(ppcle)? I tried use ppc64le/golang as the base image, I got the following error message and can’t deploy the chaincode:

aaren
2016-05-03 06:37
13:40:52.394 [dockercontroller] Deploy -> ERRO 0d1 Error building Peer container: The command '/bin/sh -c go install http://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 && cp src/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/chaincode_example02 $GOPATH/bin/7aa1243a0483f8972c41354f2fdfa7ab624b06a431dec672ac4c19fe74cd9355647fa68abb02c8f4d3d563f8d38281694f1e91550915770d3b750510451a5400' returned a non-zero code: 1

ghaskins
2016-05-03 11:22
@aaren: support for non x86 is still WIP

ghaskins
2016-05-03 11:22
what you can do is try to build the base image locally, this is facilitated in the ./devenv/baseimage directory

ghaskins
2016-05-03 11:22
i think you will need to install packer+jq and then do “make docker"

ghaskins
2016-05-03 11:23
that will produce the baseimage installed in your local environment

ghaskins
2016-05-03 11:25
im not sure this has been tried on ppcle yet so you are in unchartered waters, though there are people looking at getting z/p added first-class in addition to x so its only a matter of time

novusopt
2016-05-03 11:49
Hi, where can i find the openblockchain/baseimage Dockerfile for the execution of chaincodes?

novusopt
2016-05-03 11:54
@ghaskins: i did what you explained on my local machine (ubuntu) but i get still the same error (see aaren's error)

ghaskins
2016-05-03 12:20
@novusopt: I suspect what you are seeing is the docker image is a 2 phased design

ghaskins
2016-05-03 12:21
we commit a strictly versioned image to dockerhub (e.g. “0.0.9”) as the first phase, and then run a provisioner script as the second phase which ingests the versioned image locally and tags it with :latest

ghaskins
2016-05-03 12:22
my guess is, you ran the “cd ./devenv/baseimage; make docker” part of the workflow (which generates the first phase artifact for dockerhub) but still need to run phase 2

ghaskins
2016-05-03 12:23
if so, the answer is that the system runs "./scripts/provision/docker.sh 0.0.9” during provisioning (such as vagrant up, travis runs, etc) that you would nee to emulate

ghaskins
2016-05-03 12:23
does this sound like your situtation?

simon
2016-05-03 12:25
i still think this is too complicated

simon
2016-05-03 12:25
i want a single command to do everything - build and test source, build images, everything

ghaskins
2016-05-03 12:30
you have it: vagrant up :wink:

ghaskins
2016-05-03 12:31
just the world isnt that simple

ghaskins
2016-05-03 12:32
part of the problem is we are using a lot of bleeding edge tech (e.g. proto3) so normal dependency mechanisms fall apart

ghaskins
2016-05-03 12:33
if it werent for that, we could probably just JIT things with apt-get and get closer to what you are asking for

ghaskins
2016-05-03 12:34
but until then, we are stuck with the need to custom build things from source and/or host the artifacts of those builds ourselves

ghaskins
2016-05-03 12:34
both have their own challenges

novusopt
2016-05-03 12:58
@ghaskins: there is no Dockerfile for the chaincode docker environment?

simon
2016-05-03 12:58
no, it is hidden in core.yml

ghaskins
2016-05-03 13:07
There are multiple dockerfiles defined in yaml

ghaskins
2016-05-03 13:08
The one you are asking about is in core.yaml at chaincode.golang iirc

ghaskins
2016-05-03 13:21
Note that almost all of them dynamically augment what's in yaml at runtime

ghaskins
2016-05-03 13:21
Via the docker api

novusopt
2016-05-03 14:06
@ghaskins: thanks! it is working

ghaskins
2016-05-03 14:07
Nice

novusopt
2016-05-03 14:13
i think we should simplify it, or provide a manual which describes how to install the fabric on the local machine

ghaskins
2016-05-03 14:21
yeah, it needs refinement

ghaskins
2016-05-03 14:21
I have an idea I want to try

novusopt
2016-05-03 14:25
@ghaskins: great

ghaskins
2016-05-03 14:26
out of curiosity, are you building non-x86 too like @aaren ?

ghaskins
2016-05-03 14:26
or was this just non-vagrant x86

novusopt
2016-05-03 14:26
non-vagrant x86 (ubuntu 14.04)

ghaskins
2016-05-03 14:26
gotcha

ghaskins
2016-05-03 14:26
i think there are a fairly large number of people with that particular config

novusopt
2016-05-03 14:27
yes

novusopt
2016-05-03 14:27
i think a good starting point would be a simple script

ghaskins
2016-05-03 14:27
well, thats what we were trying to work towards with the ./scripts/provision area

novusopt
2016-05-03 14:28
ah cool

ghaskins
2016-05-03 14:28
so, [vagrant|travis|custom|whatever] -> ./scripts/provision/*.sh at provisioning time

ghaskins
2016-05-03 14:29
right now its just docker+custom, though I was already working on delineating between host/docker and different hosts

novusopt
2016-05-03 14:29
good idea

ghaskins
2016-05-03 14:30
as per this (currently suspended) PR: https://github.com/hyperledger/fabric/pull/1327/files

ghaskins
2016-05-03 14:31
one problem is that the imperative scripts are more conducive to clean-slate provisioning such as the environments within vagrant/travis

ghaskins
2016-05-03 14:31
it might make sense to try to migrate to something more declarative like puppet so environments like yours may be properly reconciled

ghaskins
2016-05-03 14:31
but that is TBD

novusopt
2016-05-03 14:32
i see

cbf
2016-05-03 15:24
@novusopt: there already is documentation on setting up a dev environment https://github.com/hyperledger/fabric/blob/master/docs/dev-setup/devenv.md

cbf
2016-05-03 15:24
it could be improved, but it is pretty straight-forward

cbf
2016-05-03 15:27
if you want that without vagrant, there are some like @joequant, @jeremyeder and @jonathanlevi that have been discussing this

joequant
2016-05-03 15:27
has joined #fabric

novusopt
2016-05-03 16:08
@ cbf i saw it but it was not sufficient. I had a problem to set up the docker environment for the chaincode. I had to excecute some manual tasks.

novusopt
2016-05-03 16:09
But it is now working

ghaskins
2016-05-03 16:21
Ill review the document, I suspect some of the newer requirements are not reflected properly

arner
2016-05-03 18:23
has joined #fabric

binhn
2016-05-03 19:57
@jeremyeder: @ghaskins just catching up — could either of you submit a pull request re > ./version -> “0.0.9”

ghaskins
2016-05-03 19:58
@binhn: i def can once I sort out the logistics

ghaskins
2016-05-03 19:58
for instance, how to import that into Vagrantfile/travis.yml

binhn
2016-05-03 19:58
@ghaskins: great - thanks

ghaskins
2016-05-03 19:59
any time

aaren
2016-05-04 07:01
@ghaskins: Thanks Greg, I will try that, if you heard anyone built it successful , would you please let me know?

arner
2016-05-04 10:07
There are also official docker images for the (built) peer and the CA (docker pull ibmblockchain/fabric). I haven't gotten them to work yet, getting a SIGILL: illegal instruction message and a hard crash when it's trying to create the database. Did anyone have more luck?

karthik
2016-05-04 12:32
Need help - while running './peer login diego', I got an error "Failed invoking CreateCertificatePair, Failed getting enrollment data, Failed registering crypto engine. Failed registering[diego], Failed registering client [diego] with name [diego] - identity or token do not match"

ghaskins
2016-05-04 13:45
@arner: we saw a similar issue in the early days with how rocksdb was compiled

ghaskins
2016-05-04 13:46
Are you using a rocksdb that you built yourself?

ghaskins
2016-05-04 13:46
If so, you want to use the PORTABLE (iirc) flag

diego_m
2016-05-04 13:46
has joined #fabric

ghaskins
2016-05-04 13:47
See devenv/baseimage for details

ghaskins
2016-05-04 13:47
I think rocksdb is compiled in the common script

jeremyeder
2016-05-04 13:52
@ghaskins: hey -- openblockchain/baseimage doesnt seem to include any of the fabric bits

jeremyeder
2016-05-04 13:52
is that supposed to be provided somehow else?

arner
2016-05-04 13:58
Hi @ghaskins, this was straight from the ibmblockchain/fabric image (https://hub.docker.com/r/ibmblockchain/fabric/). It seems like a bug in the build then? Is the Dockerfile available somewhere? (@jeremyeder I think this is what you would be looking for as well)

ghaskins
2016-05-04 13:59
@jeremyeder: yes, that is intentional…baseimage is just the base that we use for various fabric functions (such as devenv, chaincode-containers, and network simulation

ghaskins
2016-05-04 13:59
I can see the merits of having a complete image, but I envision that would be something in parallel to baseimage (and probably based on it)

ghaskins
2016-05-04 14:00
@arner: ah, ok, i am not familiar with the ibmblockchain build process

ghaskins
2016-05-04 14:00
i can say that we saw an illegal instruction issue in the early days that was fixed once we compiled rocksdb with the PORTABLE flag set

ghaskins
2016-05-04 14:01
so that is my guess as to what you are seeing

jeremyeder
2016-05-04 14:01
@ghaskins: ah yes ok thanks. i believe i do want an image that includes everything (what would be actually used by users not devenv)

ghaskins
2016-05-04 14:01
@jeremyeder: yeah, def a nice to have…if you come up with a pipeline for producing it im sure others would find it useful as well

ghaskins
2016-05-04 14:02
i suspect there are people already doing this, they just arent publishing it to the upstream repos

jeremyeder
2016-05-04 14:02
mmm


ghaskins
2016-05-04 14:04
failure to build with that will allow the rocksdb build to set aggressive gcc optimizations based on the platform that happens to be running the build

arner
2016-05-04 14:05
Thanks!

ghaskins
2016-05-04 14:05
anytime, good luck!

hill
2016-05-04 14:31
has joined #fabric

arner
2016-05-04 14:56
If anybody knows who created the ibmblockchain images please let me know :simple_smile:

cbf
2016-05-04 15:37
: congratulations @ghaskins on becoming a hyperledger/fabric maintainer! https://github.com/hyperledger/fabric/pull/1337

ghaskins
2016-05-04 15:38
@cbf: thank you!

kletkeman
2016-05-04 15:38
@ghaskins: hey, congrats!

muralisr
2016-05-04 15:38
@ghaskins: congrats, Greg!

jeffgarratt
2016-05-04 15:39
@ghaskins: now get to work!! :wink:

ghaskins
2016-05-04 15:39
heh, indeed

jeffgarratt
2016-05-04 15:39
jk, awesome stuff!!

jeffgarratt
2016-05-04 15:39
well earned

adc
2016-05-04 15:42
@ghaskins: congrats :simple_smile:

arnaud
2016-05-04 15:42
well deserved!

ratnakar
2016-05-04 15:43
has joined #fabric

vukolic
2016-05-04 15:44
Congrats @ghaskins

joseph
2016-05-04 15:47
@ghaskins: congrats and thank you for your assistance.

novusopt
2016-05-04 17:33
@ghaskins: congrats!

ghaskins
2016-05-04 17:36
thanks all

novusopt
2016-05-04 19:03
I have a comprehensive question, when a chaincode calls another chaincode is this then also a transaction?

ghaskins
2016-05-04 19:08
I believe it all executes under the originating transaction

ghaskins
2016-05-04 19:09
i.e. the second chaincode would see the tcert context of the caller that hit the first chaincode

ghaskins
2016-05-04 19:09
though I would also like to see the identity of the calling chaincode represented somehow, i dont think this is in place today

jzhang
2016-05-04 19:25
@ghaskins: congrats!

canedy
2016-05-04 21:22
So I'm a newbie. Just looking for some quick information on where to get some introduction info. Where to get beginners info.

arnaud
2016-05-04 23:16
@canedy have you installed the environment yet?

arnaud
2016-05-04 23:17
if not I suggest you start with that, just follow the installation instructions from the README and get the environment set up

arnaud
2016-05-04 23:17
run the tests to make sure it works

muralisr
2016-05-04 23:23
@novusopt: as @ghaskins said, there’s only one transaction… the one initiated by the user

joseph
2016-05-05 03:00
@novusopt: @ghaskins @muralisr I will post your question and answers on SO.


novusopt
2016-05-05 06:23
Thanks guys

karthik
2016-05-05 11:46
Need help: I am getting an error 'Registration to the Membership Service Required' while running with security enabled

ghaskins
2016-05-05 12:06
@karthik: I am not an expert with security/membersrvc, but ive played a little: are you seeing this message when you start the peer, or is it a client-level error?

karthik
2016-05-05 12:12
I am getting this error when I initialize the chaincode

binhn
2016-05-05 13:35
@karthik: if you followed this doc https://github.com/hyperledger/fabric/blob/master/docs/API/SandboxSetup.md and still see that error, could you create an issue and attach the full log. Thanks

mcrafols
2016-05-05 13:39
if you are running with security enabled, you can only deploy a chaincode when you have registered a user (its in the doc @binhn mentions)

arnaud
2016-05-05 14:22
I submitted PR #1357 which changes the usage of the peer command. Given the impact this will have on everybody using this command I encourage you to have a look and speak up if you have a problem with the new commands.

ghaskins
2016-05-05 14:23
@arnaud: I took a brief look yesterday when it came in and I thought it made sense

ghaskins
2016-05-05 14:23
i noted the travis test was no longer launching it properly though :wink:

ghaskins
2016-05-05 14:23
but you may have since fixed that, i didnt follow up

arnaud
2016-05-05 14:25
yes, I did

arnaud
2016-05-05 14:26
I tried to be pretty thorough in looking for places where the peer command is invoked or referred to in docs so I could fix these but given how pervasive this is I may have missed some unfortunately

arnaud
2016-05-05 14:27
the ci tests failed but for some unrelated reason I believe

arnaud
2016-05-05 14:28
they failed the same way when all I did was modify the README yesterday...

ghaskins
2016-05-05 14:47
yeah, the CI tests are fairly unreliable

ghaskins
2016-05-05 14:47
i just noticed that it actually died trying to launch the peer binary

ghaskins
2016-05-05 14:48
normally I disregard when I see something like behave #680 fail, it does that almost all the time for me

ghaskins
2016-05-05 14:49
sorry, nothing to do with CI, the behave tests are unreliable (at least 1-2 of them)

cbf
2016-05-05 14:57
agree, they really need to be cleaned up

ghaskins
2016-05-05 20:38
anyone know whats going on with the CI build right now?

ghaskins
2016-05-05 20:39
really weird string of errors in the last 6-8 builds

jzhang
2016-05-05 22:51
@karthik: one thing that could trip you over was that unless you have security turned on in core.yaml, you must pass in the env variable in all commands including calls to init the chaincode

jzhang
2016-05-05 22:53
that happened to me on Mac where I pass in the env var during each call instead of setting it for the command line session. The instruction didn't show you need to do that for the chaincode calls.

sheehan
2016-05-05 23:51
@ghaskins: seems unit tests were failing locally due to the license change. It seemed to be a timing issue in the chaincode test. Strange because the change was comments only. On my phone so I'm having trouble seeing what's failing in CI

sheehan
2016-05-05 23:55

ghaskins
2016-05-06 00:06
That's weird, I was looking through the commits to see what might have caused it. I saw the license patch but nothing jumped out at me as being a likely culprit

sheehan
2016-05-06 00:12
@muralisr: maybe you could take a look if you have a chance? I think a timing in one of the chaincode tests is too short

muralisr
2016-05-06 00:13
@sheehan: why do you think that

sheehan
2016-05-06 00:13
@ghaskins: yeah, very strange. I looked through it carefully and only saw comments and white space changes

sheehan
2016-05-06 00:14
@muralisr: because it was a comment only change, but now the test is failing. Not sure what else it may be

muralisr
2016-05-06 00:14
hmm

muralisr
2016-05-06 00:15
nothings changed in this area…. do you have logs or something ? I can take a quick look if you do

muralisr
2016-05-06 00:16
i can update env and try later

sheehan
2016-05-06 00:18
On my phone. Will send you the logs later or show you tomorrow

muralisr
2016-05-06 00:19
ok

muralisr
2016-05-06 00:19
will try to run the tests later today

ghaskins
2016-05-06 01:26
@ghaskins uploaded a file: https://hyperledgerproject.slack.com/files/ghaskins/F16KCEFAN/-.txt and commented: @muralisr: This seems to be the consistent failure in the logs


ghaskins
2016-05-06 01:26
the trigger for why this started happening makes little sense to me though

ghaskins
2016-05-06 01:32
FWIW, @tsariounov was seeing this exact error today during testing a chaincode-to-chaincode invoke…ill defer to him on the details

sheehan
2016-05-06 02:54
@muralisr: do any tests depend on the hash of a chaincode?

lfishle
2016-05-06 02:55
has joined #fabric

muralisr
2016-05-06 11:44
@sheehan @ghaskins : chaincode_example04 tests calling chaincode_example02 with ID hardcoded in chaincode_example04.


muralisr
2016-05-06 11:45
TestChaincodeInvokeChaincode uses example04

simon
2016-05-06 11:46
oh my

muralisr
2016-05-06 11:46
TestChaincodeQueryChaincoide uses example05 which accepts an ID passed to it

muralisr
2016-05-06 11:47
so the later won’t fail for changes to example02 and the former will

simon
2016-05-06 11:47
this is not a trivial issue - what are the semantics of upgrading a chaincode? should all chaincodes start using the new version?

simon
2016-05-06 11:48
shouldn't they have a choice on whether they should use the new version or not?

muralisr
2016-05-06 11:53
well, that’s the purpose of the two examples - to show the effect of hard coding ids. But changing example02 is not really an “upgrade” as something known to the system.

muralisr
2016-05-06 12:00
@sheehan: @ghaskins - will run the latest and push out a PR to fix the test case if chaincode example02 has changed. I’ll also put a comment in chaincodeexample02 to note changes to 02 will affect 04

ghaskins
2016-05-06 12:01
ah!

ghaskins
2016-05-06 12:01
at least that makes sense

muralisr
2016-05-06 12:02
i meant to run that last night but got sidetracked…. sorry about that

ghaskins
2016-05-06 12:11
one odd thing, it seems like the tests pass when I run locally

muralisr
2016-05-06 12:14
ok

sheehan
2016-05-06 12:38
They were failing locally for me

muralisr
2016-05-06 12:38
is there an issue I can attach the PR to ?

sheehan
2016-05-06 12:39
@muralisr: this seems to indicate the Go binaries do include source. I also read they're adding a feature in 1.7 to optionally not include the source. I remember we were asking this question for system chaincode

muralisr
2016-05-06 12:43
@sheehan: the unit tests run on the local file system and the peer image we create has the file system. It is only when you use the peer exe without the files in GOPATH that we will have a problem… right ?

simon
2016-05-06 12:45
binaries include source code?

simon
2016-05-06 12:45
i guess they include line numbers for traceback


simon
2016-05-06 12:54
ah

simon
2016-05-06 12:55
i wonder why we don't just ship a single binary

simon
2016-05-06 12:55
docker container

novusopt
2016-05-06 12:56
How do i check the signature of a transaction within a chaincode. There is an example asset management which checks the signature, but they are using the metadata that means it is done manually

simon
2016-05-06 13:01
novusopt: manually as opposed to?

garisingh
2016-05-06 13:01
has joined #fabric

novusopt
2016-05-06 13:03
@simon: how can i access the signature of a transaction, without using the metadata field ?

novusopt
2016-05-06 13:03
@simon: correct me if i am wrong, i thought the metadata field is optional...?

novusopt
2016-05-06 13:04
i can paste any information i want...

simon
2016-05-06 13:04
you mean `GetCallerMetadata`?

novusopt
2016-05-06 13:05
yes

simon
2016-05-06 13:05
i'm no expert - maybe @adc can help out here

tsariounov
2016-05-06 13:07
Hi @sheehan , @muralisr : so was that error determined? I'm running into a similar error when calling one cc from another (ie client(dev cmndline) -> cc1 -> cc2). If there is no error in cc2, it works fine, but if cc2 returns an Error (whether in an invoke or query), I get this type of error (ie Chaincode handler FSM cannot handle message) and cc1 gets killed even before it can print the response from cc2.

novusopt
2016-05-06 13:07
@simon: @adc or can i skip this in the chaincode because the validator checks already the signature?

simon
2016-05-06 13:07
the validator doesn't know what you want to check the signature against

tsariounov
2016-05-06 13:08
(this was on sha 53c67ac btw)

novusopt
2016-05-06 13:09
@simon: i think the validator checks the signature of every transaction, "does the user have the correct private key to the corresponding public key"....

simon
2016-05-06 13:09
well, but for asset management, you don't know who owns the asset

muralisr
2016-05-06 13:23
@tsariounov: you may be running into a different issue. I can help you with that if you are still running into that problem.

tsariounov
2016-05-06 13:27
@muralisr: maybe... how do you suggest we proceed, I still have the issue and nothing obvious so far

muralisr
2016-05-06 13:28
perhaps do this 1-1 … in 10 mins maybe ?

novusopt
2016-05-06 13:28
@simon but why i have to create a manual signature?

novusopt
2016-05-06 13:29
by using the metadata

simon
2016-05-06 13:29
i don't think so

novusopt
2016-05-06 13:29
each transaction gets signed

tsariounov
2016-05-06 13:29
@muralisr: sounds good, i'm on a call till the next hour, but anytime after that is great

yannik
2016-05-06 13:38
has joined #fabric

yannik
2016-05-06 13:46
I am experiencing a suspicious behaviour when using the default dev setup (noobs consensus). If I boot up three nodes, vp0, vp1, vp2 and init some contracts to vp0, then all three nodes sync them and I can query / invoke contracts from any of them. However, if I turn off one of the node and boot it up again, even if it picks up the network, it does not get the contracts in the blockchain - I can't query the reborn. Is this the expected behaviour? I would rather have the new one syncing the contracts and after a while, being able to query it. Happy to dump here any trace if needed.

michaelhaley
2016-05-06 13:47
has joined #fabric

muralisr
2016-05-06 13:51
@yannik assuming “sync” works correctly we still have a problem (just remembered)… we don’t currently resurrect the image from a deploy transaction if it doesn’t exist

yannik
2016-05-06 13:55
@muralisr: I can query / invoke the deployed contract from vp1 and vp2 without problem and I can see contract's containers running from the `docker ps` command.

tuand
2016-05-06 13:56
docker ps will show the chaincode containers

ghaskins
2016-05-06 17:27
does anyone recall/know which unit-test(s) specifically require the peer to be running?

tuand
2016-05-06 17:30
./core/peer/peer_test.go i believe

ghaskins
2016-05-06 17:30
@tuand: ty

ghaskins
2016-05-06 18:05
@sheehan @cbf @anya @ramesh (on mobile, not logged into github). I have a proposal regarding the sdk unit tests

ramesh
2016-05-06 18:05
has joined #fabric

anya
2016-05-06 18:05
has joined #fabric

ghaskins
2016-05-06 18:06
Assuming the makefile PR is accepted, Travis can call "make all-tests" and we can hook it from there

ghaskins
2016-05-06 18:07
With go-tests, sdk-tests, behave as sub targets

ghaskins
2016-05-06 18:08
I have a patch in progress that manages the peer wrt the go unit tests, it strikes me that the sdk could either use something similar or behave, as appropriate

ghaskins
2016-05-06 18:08
I'll send out a patch that highlights the idea when at my desk

ramesh
2016-05-06 18:09
yes @ghaskins . Also, I have install few steps in travis yml file to install supporting language to test sdk

sheehan
2016-05-06 18:28
ok, sounds like we should merge 1378 and then add the tests into travis using another PR?

ghaskins
2016-05-06 18:32
that sounds reasonable to me

ghaskins
2016-05-06 18:33
what I am proposing would be predicated on 1374 also going in, so we can decide how the sdk tests are integrated an an extension of that conversation

sheehan
2016-05-06 18:44
ok, will merge

ghaskins
2016-05-06 18:50
@ghaskins uploaded a file: https://hyperledgerproject.slack.com/files/ghaskins/F16RSADJR/-.txt and commented: @sheehan: this is what my current patch looks like on top of 1374

ghaskins
2016-05-06 18:50
I am envisioning that the sdk steps could be modeled in a similar way (unless integrating with behave is more appropriate

ghaskins
2016-05-06 18:52
(or a middle ground might be similar to above, but use docker-compose to set up the CA+peer rather than drive by the makefile

tuand
2016-05-06 19:08
@ramesh @bmos299 and team are working on a mapping layer that sits between behave and sdk. The goal is that you can drive sdk tests and backend tests via behave

ghaskins
2016-05-06 19:10
@tuand: ok, that sounds good too

theophoric
2016-05-06 20:45
has joined #fabric

erik
2016-05-08 03:36
has joined #fabric

juanblanco
2016-05-08 17:35
has joined #fabric

pablofullana
2016-05-08 22:09
has joined #fabric

kcar
2016-05-09 01:49
has joined #fabric

ibmamnt
2016-05-09 05:45
[Question] When and Who write to DB (rocksDB) ? -- By looking at fabric (not extensively, but roughly), it looks like to me what each "peer" process keeps world state in the memory, and when the consensus is made against transaction, it records to it's "world state" (in memory). And it is written to RocksDB at some point (this is a question). I could not understand the condition when and who writes into the DB. As for writing the DB, looks like each "peer" process writes to rocksDB based on current world state, and world state is synced frequently within a network. If wring to DB is correct, question is a condition of writing to the DB. This came to my mind what will happen "when 1 peer has lost the connection due to the power outage or data center maintenance for 1 day, and can it recover the world state?" The last test might be able to done in local env.

ibmamnt
2016-05-09 06:07
[Question 2] When the world state syncronized ? -- I have setup 4 peers with "docker-compose-4.yml" configuratio found in bddtest folder. After running 4 peers, I run several transaction, and then stopped one of it "vp3". And I have run several transactions. After it, I restarted "vp3". I see this inconsistency. ```$ curl -s http://172.17.0.3:5000/chain/ | jq '.height' 11 $ curl -s http://172.17.0.4:5000/chain/ | jq '.height' 8 $ curl -s http://172.17.0.3:5000/chain/blocks/10 | jq '.transactions[].uuid' "885d9df0-f9ae-4ce3-aed3-992d28d255f6" $ curl -s http://172.17.0.4:5000/chain/blocks/10 {"Error": "openchain: resource not found"}```

ibmamnt
2016-05-09 06:07
vp3 (http://172.17.0.4 in my env) is reporting block height '8' rather than '11'. And seems it does not change.

shubhamvrkr
2016-05-09 06:25
has joined #fabric

lg-fuzo
2016-05-09 08:26
has joined #fabric

simon
2016-05-09 09:23
ibmamnt: the ledger and state gets updated when a transaction block is committed

simon
2016-05-09 09:24
ibmamnt: individual peers are not guaranteed the latest state of the blockchain - only 2f+1 out of 3f+1 are guaranteed to have the latest state. Actually not even that is true, because it is an asynchronous system.

shubhamvrkr
2016-05-09 10:19
hello..where is the log file for peer is stored?

simon
2016-05-09 10:23
what log file?

shubhamvrkr
2016-05-09 10:24
state changing log file..i mean each peer has its own state http://maintained.is it logged or not?

simon
2016-05-09 10:25
not logged

shubhamvrkr
2016-05-09 10:25
so the peer dont maintain any logs?

simon
2016-05-09 10:26
it maintains the state, not change logs of the state

shubhamvrkr
2016-05-09 10:31
i came across api logging levels in peer ..what is this used for?

simon
2016-05-09 10:33
what exactly are you talking about?

ry
2016-05-09 15:30
has joined #fabric

sheehan
2016-05-09 15:30
@grapebaba: responding to your question in #, yes, it uses gRPC for communication. General consensus is that this provides better performance than the JSON RPC API, though I haven’t seen numbers to confirm.

yingfeng
2016-05-09 15:31
how could i support native currency using chaincode? Does there exist any examples for a reference?

ranga
2016-05-09 15:43
has joined #fabric

hscholl
2016-05-09 17:44
has joined #fabric

dmurik
2016-05-09 17:50
has joined #fabric

jeroiraz
2016-05-09 19:37
has joined #fabric

masanobu
2016-05-09 23:11
has joined #fabric

vax
2016-05-09 23:43
has joined #fabric

grapebaba
2016-05-10 00:49
@sheehan: i am confused, i thought NVP just deploy rest API service, how can client and server communicate with gRpc


dfeygin
2016-05-10 01:06
has joined #fabric

grapebaba
2016-05-10 01:56
@sheehan: so actually we use grpc gateway?both expose rest and grpc?

ibmamnt
2016-05-10 02:43
@simon: Thanks for the answer. Appreciated. As for sync inconsistency, there are a couple of open discussions ( e.g. #933, #1331), I'll monitor those too.

nits7sid
2016-05-10 04:48
Is it possible to convert the 000030.log file from my local directory /var/hyperledger/production/db into human readable format?

micah_gem
2016-05-10 07:20
has joined #fabric

nits7sid
2016-05-10 10:53
What encryption alogorithm is used for encrypting pauload when security enabled

nits7sid
2016-05-10 10:53
payload**

simon
2016-05-10 10:56
@adc will know

paulx
2016-05-10 11:21
has joined #fabric

grapebaba
2016-05-10 12:56
@sheehan: i saw the doc, grpc is used for peers communication, application just use rest API to communicate blockchain. You example means application can directly use grpc to blockchain,right?

maro
2016-05-10 13:11
has joined #fabric

ghaskins
2016-05-10 13:40
@grapebaba: i believe that is accurate, clients have a choice between REST and GRPC

privoal
2016-05-10 14:06
has joined #fabric

plucena
2016-05-10 14:24
has joined #fabric

grapebaba
2016-05-10 14:44
@ghaskins: it seems missing in doc. And why not also move the golang client code under fabric-API repo too

ghaskins
2016-05-10 14:46
right now its integrated into the peer binary

grapebaba
2016-05-10 14:48
i see. so it is a little odd the fabric-API just a java SDK

ghaskins
2016-05-10 14:49
im not even sure what you are referring to

ghaskins
2016-05-10 14:49
i am familiar with the node-sdk in ./sdk/node

ghaskins
2016-05-10 14:50
but you are correct about the doc, it only covers CLI/REST today

ghaskins
2016-05-10 14:51
oh, you are talking about this: https://github.com/hyperledger/fabric-api

grapebaba
2016-05-10 14:51
yes

ghaskins
2016-05-10 14:52
keep in mind that “fabric” derives from IBMs contribution and fabric-api derives from DAH…im sure there are plenty of opportunities for refactoring where it makes sense, but its still WIP

grapebaba
2016-05-10 14:53
clear

grapebaba
2016-05-10 14:53
thanks

cbf
2016-05-10 16:19
I’ve already made the point with @tamas and @sheehan that we need to work on the README to make it clear what this is and how it relates etc

ghaskins
2016-05-10 16:37
@sheehan @cbf: any further comments on PR 1415? If you don’t think my suggestion should go in, I can merge this as it is.

ghaskins
2016-05-10 16:39
at some point, we should probably have a line for “I ran ‘make checks’” which would serve as a superset of unit/behave/goimports, etc, but I don’t think we are there yet so the goimports line should probably stay as it is

sheehan
2016-05-10 16:41
yes, I think merge for now, and then we will change it again to say “make checks” once that is available

cbf
2016-05-10 18:22
@ghaskins: +1

mgarciap
2016-05-10 21:17
has joined #fabric

narikiyoy
2016-05-10 23:54
has joined #fabric

karthik
2016-05-11 06:14
Need help in solving this error : 05:52:24.204 [devops] getChaincodeBytes -> ERRO 2cb Error getting chaincode package bytes: Error getting code Getting chaincode took too long 05:52:24.205 [devops] Deploy -> ERRO 2cc Error deploying chaincode spec: type:GOLANG chaincodeID:<path:"https://github.com/myGit/Chaincode" > ctorMsg:<function:"init" args:"a" args:"Alice" args:"b" args:"Bob" >

karthik
2016-05-11 06:24
I am facing this error while trying to initialize a chaincode

karthik
2016-05-11 06:25
It is given in the 'Setting Up a Network' document


karthik
2016-05-11 07:15
Anyone who has set up the fabric dev network, can you help me with this?

mcrafols
2016-05-11 08:15
@karthik: how are you doing your deploy? The path "https://github.com/myGit/Chaincode" seems not correct.

karthik
2016-05-11 08:26
modified chaincode is in my git repository

karthik
2016-05-11 08:28
this was working earlier with OBC setup (without vagrant)

mcrafols
2016-05-11 08:30
can you check in your chaincode if you are importing this: "http://github.com/openblockchain/obc-peer/openchain/chaincode/shim"?

karthik
2016-05-11 08:32
yes

mcrafols
2016-05-11 08:32
you should change that

karthik
2016-05-11 08:33
Oh! yes. OK I would do that


karthik
2016-05-11 08:33
you think that was causing the timeout

mcrafols
2016-05-11 08:34
yeah I saw the same problem while deploying the Marbles app locally

simon
2016-05-11 09:08
@joseph: the chaincode does not manage rollback at all

simon
2016-05-11 09:09
rollback and commit happen from the outside

joseph
2016-05-11 09:12
@simon: In an invoke transaction, I did some actions like this 1) Put State, 2) Put State 3) Put State.

joseph
2016-05-11 09:13
At step 3 I got an error.

joseph
2016-05-11 09:14
When I verified states at step 1 and 2, I didn't see the values that I wanted to save at those steps.

joseph
2016-05-11 09:15
What happened to steps 1 and 2 if step 3 failed?

simon
2016-05-11 09:23
joseph: what kind of error?

simon
2016-05-11 09:23
this is something we have not really specified yet

simon
2016-05-11 09:24
i hope @garisingh can give some guidance on this

simon
2016-05-11 09:24
I think transactions that fail (error return) should not be part of the block

garisingh
2016-05-11 09:25
@sheehan should be able to provide more details, but basically when you call "Put State" from within chaincode, the actual persisted state (i.e. what is stored in rocksdb) is not actually being updated yet. After a successful invocation of your chaincode function (meaning no unhandled exceptions or no exception created), what you end up with is basically an in-memory collection of the proposed state changes. Depending on the consensus algorithm and config parameters, at some point Commit is called by the system and at that time we actually attempt to write the changes to the database. If one of those Put calls results in an error, then things get rolled back (and as a matter of fact, if this was in a block of transactions, at this point I believe the entire block fails). But @sheehan can correct me where I am wrong

joseph
2016-05-11 09:25
@simon Actually, at step 3 I made it return an error based on a condition.

simon
2016-05-11 09:25
currently there is a single database transaction encompassing multiple chaincode transactions, but we may have to be able to roll back individual chaincode transactions

simon
2016-05-11 09:26
joseph: ah, so after the last putstate you return an error?

simon
2016-05-11 09:26
joseph: or do you mean you invoke 3 times?

garisingh
2016-05-11 09:26
@joseph - if your chaincode throws an exception, no state changes will occur, the tx is not processed and I don't believe the tx is in any block

joseph
2016-05-11 09:26
return an error after step 3.

garisingh
2016-05-11 09:27
each invoke on chaincode results in an atomic set of state changes - it's all or none. and if being processed as part of a batch, it is currently all or none for the batch

simon
2016-05-11 09:27
garisingh: i don't think so?

simon
2016-05-11 09:27
is that really the case?

garisingh
2016-05-11 09:28
I could be totally wrong :wink:

simon
2016-05-11 09:28
i think the errors are just collected

garisingh
2016-05-11 09:28
@sheehan best to answer - but I am pretty sure that is how it mostly works

simon
2016-05-11 09:28
but it doesn't matter much how it currently works - we should figure out how we want it to work

simon
2016-05-11 09:28
what are the correct semantics?

simon
2016-05-11 09:29
i think chaincode being able to abort the whole block is dangerous

garisingh
2016-05-11 09:30
so - the result of a chaincode invocation is going to be a set of one or more state changes. I think we can agree that those should be all or nothing. Within chaincode, you can handle any errors you want, but if you return success, I think all state changes made should be considered an atomic set of operations

simon
2016-05-11 09:31
yes

garisingh
2016-05-11 09:32
on the batch thing, I agree that one tx should not roll back an entire block, although this can be quite tricky depending on the transactions. this is probably why we do need to think about some type of MVCC approach

simon
2016-05-11 09:32
right

simon
2016-05-11 09:32
that will address a lot of issues

simon
2016-05-11 09:32
we really need to think of this as a database, not of some undefined something system

garisingh
2016-05-11 09:33
agreed

garisingh
2016-05-11 09:33
now we can probably be intelligent about things as well given that state is associated with chaincode - so if there was a batch of tx and they all invoked different chaincode / functions / state, perhaps we can optimize as well

garisingh
2016-05-11 09:34
But I am pretty sure that I am close to being correct in how things work in the code today as implemented

joseph
2016-05-11 09:34
For confirmation, in case of returning an error within my chaincode, no states were saved at step 1, 2 and 3?

garisingh
2016-05-11 09:34
correct

simon
2016-05-11 09:35
it should be so

simon
2016-05-11 09:35
i'll have a look

joseph
2016-05-11 09:35
Nice. Thanks you, guys.

simon
2016-05-11 09:41
garisingh: i think you're right. the code rolls back the current tx state

simon
2016-05-11 09:41
but then, why do we record the transaction and the error in the block?

garisingh
2016-05-11 09:45
@simon - interesting - I recall at one point that not being the case although I could be wrong there as well. I guess if we think about it, the transaction was technically invoked and perhaps it is valuable to know that your transaction resulted in an error. And of course given that tx processing is async from the invoker's perspective, the only place to store the "result" (even if an error) is the ledger.

garisingh
2016-05-11 09:45
but confusing all around

simon
2016-05-11 09:45
it seems simple


simon
2016-05-11 09:47
but that's some DoS potential - I could invoke one chaincode over and over. say I don't have the authorization or the balance to perform that transaction; that would mean that I could spam the blockchain

simon
2016-05-11 09:47
and this can't be cleared easily later

simon
2016-05-11 09:49
garisingh: there are certainly situations where a transaction is considered invalid and never makes it in a block. because we have to handle those as well, we could use the same mechanism to notify transaction errors

garisingh
2016-05-11 09:50
agreed

garisingh
2016-05-11 09:52
perhaps it exists, but it would probably be helpful to have a flow diagram of the state machine replication

garisingh
2016-05-11 09:54
e.g. more details on ```submit / invoke transaction --> consensus --> ordered list of transactions --> execute chaincode --> collect state changes --> process state changes ... ```

garisingh
2016-05-11 09:55
IMHO, we actually have 2 state machines - one to execute chaincode (outputting proposed state changes) and another to actually process the state changes

simon
2016-05-11 09:56
you mean a message flow diagram?

simon
2016-05-11 09:57
i can try to create that

garisingh
2016-05-11 09:59
basically the flow of a message from submission until it reaches the ledger

garisingh
2016-05-11 09:59
and everything that happens in between :wink:

yiseul
2016-05-11 10:02
has joined #fabric

simon
2016-05-11 10:02
okay, i can try to create that

garisingh
2016-05-11 10:05
@simon - I spoke with @jyellick and @kostas about doing something similar for consensus (including checkpointing). Perhaps we can combine these together. I think this would be very helpful for everyone in the community as it is not clear from the protocol spec alone how everything flows together. Let me know how I can help as well

simon
2016-05-11 10:08
i'll prototype something with https://sverweij.github.io/mscgen_js/

garisingh
2016-05-11 10:11
good call

isidoro.ghezzi
2016-05-11 10:46
has joined #fabric

simon
2016-05-11 10:48
oh no.

simon
2016-05-11 10:49

simon
2016-05-11 10:50
well, i don't know how to collaborate nicely on this

simon
2016-05-11 10:57
@garisingh: ^^ not sure if this amount of detail is helpful

simon
2016-05-11 10:57
i skipped the message pattern of consensus

simon
2016-05-11 11:00
the problem with htmlized markdown on github is that you cannot include any js

garisingh
2016-05-11 11:04
thanks @simon - I'll digest but initial review looks good and I think will be very helpful. hopefully others are following along and can provide feedback as well

andrew.keys
2016-05-11 11:09
has joined #fabric

elsesiy
2016-05-11 11:11
has joined #fabric

muralisr
2016-05-11 13:55

muralisr
2016-05-11 13:56
it just passes Invoke / Query arguements to another chaincode… the called chaincode ID is sent via the “Function” parameter

suma
2016-05-11 13:59
@muralisr: this is very interesting. I have chaincodes calling chaincodes. Does this approach have performance advantages?

muralisr
2016-05-11 14:01
@suma likely not. Main goal was to write cc-to-cc tests quickly

suma
2016-05-11 14:01
ok. got u. neat, thoguh. i’ll try it. i think it will be useful for me nevertheless

sheehan
2016-05-11 14:11
@garisingh: haven’t read the entire conversation, but you’re correct about state changes being held in memory until the block is committed. At that point it’s written to the DB. We do have the ability to roll back either individual transactions or the entire block. It’s up to the consensus mechanism if they use this functionality

muralisr
2016-05-11 14:26
^^ just add to this from a chaincode point of view…. transaction execution can (1) return with a fabric error (2) return with a chaincode error and (3) return success.

muralisr
2016-05-11 14:27
(1) and (2) will cause the state of the transaction to be rolled back. The transaction itself will be entered in the block for non-sieve consensus (sieve may have other subtleties from a block creation point of view… @simon ?)

simon
2016-05-11 15:13
same thing

simon
2016-05-11 15:13
just that the commit happens later

lhy555
2016-05-12 04:07
has joined #fabric

nits7sid
2016-05-12 05:35
I am running the docker-based setup and my peer is running on ip 172.17.0.2:30303. I am not able to use the REST api from my windows (Host) machine on that peer. How should I do this?

mcrafols
2016-05-12 07:40
you are running it inside vagrant right¿

ibmamnt
2016-05-12 08:07
@nits7sid: If you want to run apis from outside of Docker host machine, probably easiest way to setup port forward something like: ```docker run --name=vp0 \ --restart=unless-stopped \ -it \ -p 5000:5000 \ -p 30303:30303 \ -e CORE_PEER_ID=vp0 \ -e CORE_VM_ENDPOINT=http://172.17.0.1:4243 \ -e CORE_PEER_ADDRESSAUTODETECT=true \ hyperledger-peer peer peer```

ibmamnt
2016-05-12 08:08
Then you should be able to access from remote machine using port:5000 (restAPI port).

nits7sid
2016-05-12 09:32
Can i Have a GUI for my vagrant machine?

primrose
2016-05-12 09:49
@vivsoft: over here! this is the place to ask questions if you run into trouble with fabric! It seems @vivsoft cannot run "make peer" because the file system is read only... does anyone have any ideas which part of the install went wrong?

vivsoft
2016-05-12 09:49
has joined #fabric

isidoro.ghezzi
2016-05-12 10:34
Hi all, are yours unit tests and behave ok? Beginning yesterday mine are failing: https://github.com/hyperledger/fabric/blob/master/docs/dev-setup/install.md#31-go-unit-tests and behave: https://github.com/hyperledger/fabric/blob/master/docs/dev-setup/install.md#33-behave-tests ``` 0 features passed, 1 failed, 1 skipped 0 scenarios passed, 25 failed, 4 skipped 0 steps passed, 25 failed, 549 skipped, 0 undefined Took 1m27.925s ``` thanks

bignano
2016-05-12 11:29
has joined #fabric

ghaskins
2016-05-12 11:51
@isidoro.ghezzi: we strive to always keep mainline passing, and this is checked for each merge. However, that doesn’t mean problems can’t slip through so if you are seeing failures, post some more info

simon
2016-05-12 12:22
yea, consensus tests are difficult because of async networks

isidoro.ghezzi
2016-05-12 13:17
@ghaskins: I think it was a network problem: ``` 2016/05/12 10:05:54 Failed Chaincode docker build: Step 1 : FROM hyperledger/fabric-baseimage Pulling repository http://docker.io/hyperledger/fabric-baseimage --- FAIL: TestVM_BuildImage_ChaincodeLocal (18.28s) vm_test.go:105: Error building Chaincode container: Error building Chaincode container: Tag latest not found in repository http://docker.io/hyperledger/fabric-baseimage FAIL FAIL http://github.com/hyperledger/fabric/core/container 54.601s ``` I repeated both unit tests and behave, and everything now looks to be ok (commit: e108db626df9427b47479c402d596f883f5fdf13) ``` --- PASS: TestVM_BuildImage_ChaincodeLocal (10.13s) PASS ok http://github.com/hyperledger/fabric/core/container 10.184s ``` … ``` 1 feature passed, 0 failed, 1 skipped 25 scenarios passed, 0 failed, 4 skipped 393 steps passed, 0 failed, 181 skipped, 0 undefined Took 20m15.364s ``` thanks

sheehan
2016-05-12 14:38
: A PR has been merged into the fabric project that makes some significant changes to the command line usage. You can read the details at https://github.com/hyperledger/fabric/pull/1357. Additional discussion can be found at https://github.com/hyperledger/fabric/issues/1158. The consensus from discussion was that this is a step in the right direction, but does not exclude additional changes in the future.

sheehan
2016-05-12 14:39
Thanks to @arnaud for this change!

cbf
2016-05-12 14:39
thanks @arnaud and @jeffgarratt for your efforts and @sheehan @ghaskins and @binhn for your reviews and feedback to make this change!

gengjh
2016-05-12 14:40
cool

cbf
2016-05-12 14:41
@sheehan: should probably send this to new hyperledger-announce as well as technical-discuss

sheehan
2016-05-12 14:42
writing an email now, but was sending to the new hyperledger-fabric list

arnaud
2016-05-12 14:48
thanks @sheehan, glad to see this change getting in!

arnaud
2016-05-12 14:49
regarding the email I don't think we should flood all the lists - cross posting is a bad practice

sheehan
2016-05-12 14:51
ok, I just send to the fabric list for now. I saw at Ry sent out a note about the new lists so hopefully people subscribed if they’re interested


sheehan
2016-05-12 17:32
oops, thanks for spotting that. Let me take a look

novusopt
2016-05-12 17:32
np

sheehan
2016-05-12 17:42
@jyellick: @tuand what are these compose files under the consensus folder? When are they being used? Seems as though they’re not part of any test as this slipped through

jyellick
2016-05-12 17:43
has joined #fabric

novusopt
2016-05-12 17:43
@sheehan: i am using them for testing

novusopt
2016-05-12 17:43
but it is currently not working

tuand
2016-05-12 17:43
they're being used by me for testing ... not part of unit/behave tests

jyellick
2016-05-12 17:43
@sheehan: I've used them to do one-off stress testing, just to bring up a test env that I can execute trans against. I think they are largely deprecated by the behave tests, but still somewhat useful

novusopt
2016-05-12 17:44
to whom can i address questions regarding docker-compose files?

tuand
2016-05-12 17:45
which docker-compose files ? general questions can go to #

novusopt
2016-05-12 17:45
in the folder consensus/docker-compose-files

tuand
2016-05-12 17:46
ask me :simple_smile:

novusopt
2016-05-12 17:46
perfect :slightly_smiling_face:

novusopt
2016-05-12 17:46

sheehan
2016-05-12 17:47
@novusopt: would you like to submit a PR for the command issue or do you want me to fix that? Looks like there’s another one that was missed at https://github.com/hyperledger/fabric/blob/master/consensus/docker-compose-files/compose-defaults.yml

novusopt
2016-05-12 17:47
i can create a PR

sheehan
2016-05-12 17:47
cool, thanks!

novusopt
2016-05-12 17:47
you are welcome

novusopt
2016-05-12 17:48
@tuand: i created the containers as desribed in the Readme

novusopt
2016-05-12 17:48
and i checked with docker-compose if everything is up and everything is up

tuand
2016-05-12 17:48
container or image ?

novusopt
2016-05-12 17:48
container

tuand
2016-05-12 17:48
ok

novusopt
2016-05-12 17:48
then i run this command:

novusopt
2016-05-12 17:48
docker exec -it dockercomposefiles_cli_1 bash

novusopt
2016-05-12 17:49
then i run: peer network list

novusopt
2016-05-12 17:49
then iget following error message: 17:49:26.030 [crypto] main -> INFO 001 Log level recognized 'info', set to INFO 17:49:26.031 [peer] func1 -> INFO 002 Auto detected peer address: 172.17.0.7:30303 17:49:26.032 [peer] func1 -> INFO 003 Auto detected peer address: 172.17.0.7:30303 17:49:26.033 [peer] func1 -> INFO 004 Auto detected peer address: 172.17.0.7:30303 2016/05/12 17:49:27 grpc: ClientConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 0.0.0.0:30303: getsockopt: connection refused"; Reconnecting to "0.0.0.0:30303" 2016/05/12 17:49:28 grpc: ClientConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 0.0.0.0:30303: getsockopt: connection refused"; Reconnecting to "0.0.0.0:30303" Usage: peer network list [flags] Flags: -h, --help[=false]: help for list Global Flags: --logging-level="": Default logging level and overrides, see core.yaml for full syntax Error: Error trying to connect to local peer: grpc: timed out trying to connect

novusopt
2016-05-12 17:50
the client cannot connect to the vp

novusopt
2016-05-12 17:50
are you facing the same issue?

tuand
2016-05-12 17:51
i haven't had to use network list .... what about other commands ? like login

novusopt
2016-05-12 17:51
same

tuand
2016-05-12 17:52
hmmm ... docker networking not working ... how many containers are running ?

novusopt
2016-05-12 17:53
output of docker-compose:

novusopt
2016-05-12 17:53
Name Command State Ports --------------------------------------------------------------------------------------------- dockercomposefiles_cli_1 ../scripts/infiniteloop.sh Up dockercomposefiles_membersrvc_1 membersrvc Up dockercomposefiles_vp0_1 peer node start Up 0.0.0.0:5000->5000/tcp dockercomposefiles_vp1_1 peer node start Up dockercomposefiles_vp2_1 peer node start Up dockercomposefiles_vp3_1 peer node start Up

tuand
2016-05-12 17:53
do `docker ps` ?

novusopt
2016-05-12 17:53
docker-compose ps

novusopt
2016-05-12 17:54
output docker ps:

novusopt
2016-05-12 17:54
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES bc90479d6d56 hyperledger-peer "../scripts/infinitel" 21 minutes ago Up 21 minutes dockercomposefiles_cli_1 86ce7f961007 hyperledger-peer "peer node start" 21 minutes ago Up 21 minutes dockercomposefiles_vp1_1 e20ffcbf580d hyperledger-peer "peer node start" 21 minutes ago Up 21 minutes dockercomposefiles_vp3_1 dd6523b5c38a hyperledger-peer "peer node start" 21 minutes ago Up 21 minutes dockercomposefiles_vp2_1 b1d31ca5fd26 hyperledger-peer "peer node start" 21 minutes ago Up 21 minutes 0.0.0.0:5000->5000/tcp dockercomposefiles_vp0_1 4eccee6f8f6f membersrvc "membersrvc" 21 minutes ago Up 21 minutes dockercomposefiles_membersrvc_1

tuand
2016-05-12 17:55
looks good ... i was thinking there were some stray containers left over but no

novusopt
2016-05-12 17:55
i thought the same

novusopt
2016-05-12 17:55
any idea?

tuand
2016-05-12 17:56
thinking ... nothing comes to mind offhand ... i'll have to try it

tuand
2016-05-12 17:57
would have to be later today though ... need to finish another thing this afternoon

novusopt
2016-05-12 17:57
sure, thank you :slightly_smiling_face:

tuand
2016-05-12 17:57
np ... remind me if i forget later :simple_smile:

novusopt
2016-05-12 17:58
ok :slightly_smiling_face:

arnaud
2016-05-12 20:01
@novusopt @sheehan sorry for missing a couple of references. I tried to find all occurrences of 'peer' but of course there are a lot of them that are not relevant

arnaud
2016-05-12 20:03
This shows we are missing a test. If we can't rely on the tests we're screwed.

arnaud
2016-05-12 20:05
@tuand If it's in the repo we need to have a test. Otherwise it needs to be taken out and kept privately.

vpaprots
2016-05-12 20:26
has joined #fabric

tuand
2016-05-12 21:42
@novusopt: `CORE_PEER_ADDRESS=vp0:30303 peer network list` will work ... basically, the command needed to run on the validating peer. fabric/docs/dev-setup/devnet-setup.md talks about this a bit

venganesh
2016-05-13 01:53
has joined #fabric

paul_xbt
2016-05-13 04:18
has joined #fabric

novusopt
2016-05-13 05:44
@tuand thanks a lot! it is working :simple_smile:

adc
2016-05-13 07:47
Hi @tuand, do you know what happened with logging? I'm not able anymore to activate debug logging in the latest version of the master :disappointed:

tuand
2016-05-13 12:49
hi @adc ... have not seen this but I'm still using one of Thursday's commits ... i'll check

adc
2016-05-13 12:50
^thanks

tuand
2016-05-13 13:06
i pulled commit 82064af , rebuilt everything and ran my 4vp docker setup ... debug logging is working for me

dmurik
2016-05-13 14:52
Question regarding `peer chaincode` comamands: I assume `-p` and `-l` are only relevant to `chaincode deploy`, and `-n` is only relevant to `chaincode query/invoke`. Is that correct?

sheehan
2016-05-13 15:27
yes, I believe that’s the case

muralisr
2016-05-13 15:46
@dmurik… the one exception is if you are running in —peer-chaincodedev mode

muralisr
2016-05-13 15:47
then you do “./peer chaincode deploy -n “the_name_I_gave_to_chaincode"

muralisr
2016-05-13 15:47
basically you are saying “already deployed…just use this name to send init"

dmurik
2016-05-13 17:26
@muralisr: Thanks for that. I noticed that this is actually mentioned in `docs/API/CoreAPI.md` but under a section called "Devops [DEPRECATED]". I assume it would be a good idea to make this documented somewhere else too...

muralisr
2016-05-13 18:18
@dmurik: yes, it certainly would…

greg_not_so
2016-05-14 01:39
has joined #fabric

muralisr
2016-05-14 17:04
with the latest code, debug is not default (rightly so)… to turn debug easily please use "CORE_LOGGING_LEVEL=debug”.. as in

muralisr
2016-05-14 17:04
CORE_LOGGING_LEVEL=debug ./peer node start

jianzhang98
2016-05-14 21:53
has joined #fabric

uranther
2016-05-16 00:04
has joined #fabric

fox
2016-05-16 00:30
has joined #fabric

david_boadita
2016-05-16 07:04
has joined #fabric

sz
2016-05-16 13:32
has joined #fabric

sjcorbett
2016-05-16 14:00
has joined #fabric

mikezaccardo
2016-05-16 14:31
has joined #fabric

guglielmo_n
2016-05-16 14:45
has joined #fabric

david.acton
2016-05-16 14:57
has joined #fabric

mikezaccardo
2016-05-16 15:05
Hi all, I'm new to the community and am having some trouble setting up a cluster of peers each running on different hosts. I posted a question to StackOverflow: http://stackoverflow.com/questions/37246888/multi-host-validating-peer-cluster-setup. Any help or insight from someone more experienced would be greatly appreciated, thanks!

mikezaccardo
2016-05-16 15:47
@maro perhaps this is related to your earlier question: https://hyperledgerproject.slack.com/archives/general/p1463078721001039

jzhang
2016-05-16 20:08
, I’m seeing the following error when following a procedure like this inside vagrant: 1) docker pull hyperledger/hyperledger-baseimage, 2) fabric/scripts/provisions/docker.sh 0.0.9, 3) docker build for both hyperledger-peer and membersrvc images, 4) docker-compose using bddtests/docker-compose-4-consensus-classic.yaml, 5) login user “lukas” by POSTing to /registrar, 6) deploy chaincode by POSTing to /chaincode: 19:53:42.250 [dockercontroller] Deploy -> ERRO 873 Error building Peer container: cannot connect to Docker endpoint

jzhang
2016-05-16 20:10
I followed the same procedure as I always do previously which has been working fine till today

jzhang
2016-05-16 20:11
the debug printf for "Docker endpoint” is http://172.17.0.1:2375

jzhang
2016-05-16 20:13
does this require changing DOCKER_OPTS to include 172.17.0.1:2375?

ghaskins
2016-05-16 20:13
out of curiosity, are you literally running those commands as above?

jzhang
2016-05-16 20:21
yes

jzhang
2016-05-16 20:22
my own work flow for a local network

jzhang
2016-05-16 20:22
btw after updating /etc/default/docker with the 2375 port (instead of 4243) the network is now working properly

jzhang
2016-05-16 20:23
able to successfully deploy chaincode

jzhang
2016-05-16 20:23
(needed to restart docker daemon)

paulx
2016-05-16 20:28
Hi all, just wondering what encryption algorithm the Fabric uses?

garisingh
2016-05-16 21:22
@paulx: for transactions, we use AES256 in CFB mode

garisingh
2016-05-16 21:22
the symmetric encryption key is derived using ECIES

paulx
2016-05-16 22:44
Thanks @garisingh

ghaskins
2016-05-17 01:23
@jzhang: you may already be aware of this, but steps 1-3 are managed for you when you do “make images” or other targets that depend on it

popldo
2016-05-17 02:48
has joined #fabric

joseph
2016-05-17 06:32

joseph
2016-05-17 06:33
It required the chain folder and bulk files.

joseph
2016-05-17 06:34
How can I have those files?

sheehan
2016-05-17 13:14
those a .dat files from the bitcoin mainnet or testnet. One way to get them is to start the bitcoin client and let it download the files

sheehan
2016-05-17 13:14
or I can send you a bitcoin .dat file in slack

guglielmo_n
2016-05-17 17:12
Hi all, I'm new to Hyperledger and I'm trying to follow this guide to set up a network for development: https://github.com/hyperledger/fabric/blob/master/docs/dev-setup/devnet-setup.md I can start up the first and the second peer, but when I try to deploy the chaincode to the network, I never see the message ```"Received build request for chaincode spec"``` on the output screen of any of the peers. Instead, I can only see ```16:33:40.960 [container] WriteGopathSrc -> INFO 021 rootDirectory = /opt/gopath/src ``` in the first peer. Any help would be greatly appreciated, thank you!

dmurik
2016-05-17 17:30
@guglielmo_n: Did you start the peer node with the `--peer-chaincodedev` argument?

muralisr
2016-05-17 17:40
@guglielmo_n: try with the env var CORE_LOGGING_LEVEL=debug ?

joseph
2016-05-18 02:23
@sheehan: please send me that file.

sheehan
2016-05-18 02:31
@joseph: https://www.dropbox.com/s/8bb02359lequ3rk/blk00000.dat?dl=0 That’s the first .dat file from the bitcoin testnet

joseph
2016-05-18 02:32
Thanks @sheehan

rupendradhillon
2016-05-18 04:52
has joined #fabric

mcrafols
2016-05-18 08:02
: hi! there is a few unanswered questions on stackoverflow, can someone help them solve their issues?


guglielmo_n
2016-05-18 08:37
@dmurik: No, should I? I will try and let you know, thanks! (BTW that option is not mentioned in the guide)

guglielmo_n
2016-05-18 08:38
@muralisr: Thank you for the suggestion! Now at least I can see what's going on. Worth mentioning in the guide, probably.

ken
2016-05-18 08:39
has joined #fabric

cbf
2016-05-18 10:54
weird... I'm supposed to get email notices when nee questions are posted

guglielmo_n
2016-05-18 10:57
@dmurik: I can see the message ```Received build request for chain code spec``` using ```--peer-chaincodedev``` However, I don't get back the "name" assigned to the deployed chaincode. (I think I've seen it returned once, but now it's not returned anymore.) I'm going to attach a snippet from my log.

guglielmo_n
2016-05-18 10:58

2016-05-18 10:58
@guglielmo_n commented on @guglielmo_n’s file https://hyperledgerproject.slack.com/files/guglielmo_n/F19PQGP8T/Untitled.txt: This is what I get when I run ```CORE_PEER_ADDRESS=172.17.0.2:30303 ./peer chaincode deploy -p http://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Function":"init", "Args": ["a","100", "b", "200"]}'```

guglielmo_n
2016-05-18 11:00
The command itself outputs this: ```0:42:24.777 [crypto] main -> INFO 001 Log level recognized 'info', set to INFO 10:42:24.779 [logging] LoggingInit -> DEBU 002 Setting default logging level to DEBUG for command 'chaincode' 10:42:24.791 [main] chaincodeDeploy -> INFO 003 Deploy result: type:GOLANG chaincodeID:<path:"github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02" > ctorMsg:<function:"init" args:"a" args:"100" args:"b" args:"200" > ```

allanpark
2016-05-18 11:31
has joined #fabric

novusopt
2016-05-18 11:48
is there any example which shows how the use the hyperledger client to connect to a peer?

karthik
2016-05-18 12:01
Unable to access the rest endpoints from jquery ajax:

karthik
2016-05-18 12:01
Message on VP terminals - 11:08:25.446 [rest] StartOpenchainRESTServer -> INFO 01a Initializing the REST service on 0.0.0.0:5000, TLS is disabled. 11:08:26.448 [consensus/util] RegisterChannel -> INFO 01b Registering connection from <nil>

nickmelis
2016-05-18 14:00
has joined #fabric


grapebaba
2016-05-18 14:46
@nickmelis:seems this example use fabric api

joseph
2016-05-18 14:48
@grapebaba: the example doesn't use fabric-api (https://github.com/hyperledger/fabric-api).

joseph
2016-05-18 14:49
I think the hyperledger/fabric and the fabric-api don't work together at this time. I believe.

nickmelis
2016-05-18 14:50
ah….and who does the fabric-api work with?

guglielmo_n
2016-05-18 14:51
All, @dmurik , @muralisr, This is the current situation, I can find the chaincodeID in the peer logs, for example: ```08:04:58.423 [chaincode] beforeRegisterEvent -> DEBU 71b Got REGISTER for chaincodeID = name:"1edd7021ab71b766f4928a9ef91182c018dffb86fef7a4b5a5516ac590a87957e21a62d939df817f5105f524abddcddfc7b1a60d780f02d8235bd7af9db81b66" , sending back REGISTERED``` but the ```peer chaincode deploy ...``` command does not print the ID, which makes it pretty unusable ATM from a client's standpoint.

nickmelis
2016-05-18 14:51
and where does it come from?

grapebaba
2016-05-18 14:52
you can ask @ghaskins

ghaskins
2016-05-18 14:54
the id is a composite hash of several parameters, including a hash of the chaincode itself, the ctor parameters, etc….as far as retrieving it from the command, I am not sure as I use the REST interface directly, typically

ghaskins
2016-05-18 14:54
(it is returned in the deploy response, but not sure how to get the peer-chaincode subcommand to display it

guglielmo_n
2016-05-18 14:57

guglielmo_n
2016-05-18 15:01
@ghaskins: yeah it seems to be better to use the REST APIs in this particular case, thank you.

ghaskins
2016-05-18 15:02
I thought it did too, but I havent used it in a while

nickmelis
2016-05-18 15:03
@grapebaba, @ghaskins, is it only possible to interact with an HyperLedger node via REST APIs at the moment then?

grapebaba
2016-05-18 15:08
i remember ghaskins told me fabric expose both rest and grpc service

grapebaba
2016-05-18 15:10
fabric-api seems a SDK to support grpc

grapebaba
2016-05-18 15:11
but i have not try it

nickmelis
2016-05-18 15:11
I am playing with fabric-api at the moment, but the BCSAPIClient seems to only support in memory and JMS connection factories

nickmelis
2016-05-18 15:11
and I was just curious if I can use it to connect to a node using rest or grpc

joseph
2016-05-18 15:24
@nickmelis: what I understand that

joseph
2016-05-18 15:24
fabric-api project is a proposal SDK for working with the fabric over grpc at this time.

nickmelis
2016-05-18 15:25
ok…so they <should> work together...

joseph
2016-05-18 15:26
yes. I am also waiting for that. :slightly_smiling_face:

nickmelis
2016-05-18 15:26
:slightly_smiling_face: and why are you waiting? Have you tried it and it doesn’t work? Or you’re just waiting to know if they work together?

joseph
2016-05-18 15:28
I am writing sth with the fabric. but Rest API is not enough. I should make it work with the fabric over grpc.

joseph
2016-05-18 15:30
So I change to write it based-on the example https://github.com/srderson/hyperledger-fabric-utxo-client-java

joseph
2016-05-18 15:35
I took a look at the fabric-api and think that it may be not work smoothly with the fabric.

nickmelis
2016-05-18 16:04
anyone getting Library 'libsecp256k1.dylib' not found when using fabric-api on a Mac?

nickmelis
2016-05-18 16:04
the library is definitely there (in my case in /usr/local/lib/libsecp256k1.dylib)

sull
2016-05-18 17:43
has joined #fabric

sheehan
2016-05-18 23:27
@nickmelis: I added OS X compile steps in a PR https://github.com/hyperledger/fabric-api/pull/7 but it sounds like you're already beyond that. Maybe @robert or @tamas know the answer?

christophera
2016-05-19 00:01
@christophera has left the channel

yingfeng
2016-05-19 03:15
could i setup fabirc dev networking environment without vagrant? "go test -run BuildImage_Peer " this can only work with vagrant started previously. Does there exist a standard docker image for fabric peer to run without vagrant ?


ibmamnt
2016-05-19 04:36
@yingfeng, though I have not tried, I may want to export the three images (hyperledger/fabric-baseimage, hyperledger-peer and membersvc) from your Vagrant image, and import to non vagrant envrironment.

ibmamnt
2016-05-19 04:57
```docker save``` (for image, export was for container)```

robert
2016-05-19 07:06
@nickmelis: What is the exact command you built it with? ```mvn clean package -Djava.library.path=/usr/local/lib``` would be the correct one, using the latest master.

nickmelis
2016-05-19 07:35
hi @robert, I’m trying to import fabric-api as a Maven dependency into my Java project

nickmelis
2016-05-19 08:03
being working on a Mac, it looks like the library libsecp256k1.dylib is being loaded from x86_64-MacOSX-icc/lib/, which I’m not sure it should exist

nickmelis
2016-05-19 08:04
does anyone know more about how this library should be loaded and what the mechanism should be?

yingfeng
2016-05-19 08:13
@ghaskins: @ibmamnt thankyou~

grapebaba
2016-05-19 08:20
@nickmelis: what you are actually doing?

grapebaba
2016-05-19 08:21
rest api not enough now?

nickmelis
2016-05-19 08:21
@grapebaba: I am trying to use fabric-api as a client within my java app to connect to an Hyperledger node

grapebaba
2016-05-19 08:23

nickmelis
2016-05-19 08:23
well rest api would be the backup plan, but the fabric-api is a nice Java client. If that would work I wouldn’t need to write my own client

grapebaba
2016-05-19 08:23
but just rest

nickmelis
2016-05-19 08:23
is that a client over REST?

grapebaba
2016-05-19 08:23
yes

nickmelis
2016-05-19 08:23
ah cool, you did what I was going to do soon

nickmelis
2016-05-19 08:24
that’s great

nickmelis
2016-05-19 08:24
does it also have user creation and key generation?

grapebaba
2016-05-19 08:24
it seems only nodejs SDK support grpc right now official

grapebaba
2016-05-19 08:25
just support CoreAPI.md

mtakemiya
2016-05-19 08:27
has joined #fabric

nickmelis
2016-05-19 08:28
what can you do with the REST api?

nickmelis
2016-05-19 08:28
can you sign and send transactions?


grapebaba
2016-05-19 08:34
i saw some new API docs, i will add later

nickmelis
2016-05-19 08:35
@grapebaba: for transactions I can only see a GET, which makes me think I can’t send a transaction through the REST API?

grapebaba
2016-05-19 08:36
i think invoke chaincode will send a transaction if i am right

nickmelis
2016-05-19 08:40
a post to /chaincode should just create a contract

nickmelis
2016-05-19 08:40
sorry, it’s not called contract, it’s called chaincode :slightly_smiling_face:

vladimir.starostenkov
2016-05-19 08:40
has joined #fabric

nickmelis
2016-05-19 09:08
@grapebaba: sorry you were right. With the /chaincode endpoint you can either create and invoke a contract

joseph
2016-05-19 09:19
I run a chaincode in sanbox environment with security and privacy enabled, when I deploy the chaincodem I got this error

joseph
2016-05-19 09:20
09:13:22.229 [ledger] sendProducerBlockEvent -> ERRO 028 Error unmarshalling deployment transaction for block event: proto: protos.ChaincodeDeploymentSpec: wiretype end group for non-group

joseph
2016-05-19 09:20
Could you please give me some ideas about the problem?

nickmelis
2016-05-19 09:41
@grapebaba: question about your java client: looking at FabricExample right now. When you create/deploy the chaincode, I would expect the URL of the chain code on github to be required

nickmelis
2016-05-19 09:42
where is the chaincode that example deploys?

baohua
2016-05-19 09:42
has joined #fabric

nickmelis
2016-05-19 09:43
09:42:38.852 [rest] ProcessChaincode -> INFO 019 REST sucessfully deploy chaincode: {"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params","data":"Chaincode path may not be blank."},"id":1}

nickmelis
2016-05-19 09:43
precisely :slightly_smiling_face:

karthik
2016-05-19 10:02
@joseph: I got the similar error when executing the chaincode in command line

karthik
2016-05-19 10:03
Though the error showed up in the peer terminal, the chaincode address was returned in the terminal I was passing the init, invoke commands

karthik
2016-05-19 10:05
@nickmelis: Unable to access the rest endpoints from jquery ajax: (edited) [5:31] Message on VP terminals - 11:08:25.446 [rest] StartOpenchainRESTServer -> INFO 01a Initializing the REST service on 0.0.0.0:5000, TLS is disabled. 11:08:26.448 [consensus/util] RegisterChannel -> INFO 01b Registering connection from <nil>

karthik
2016-05-19 10:05
I got this error on both scenarios with and without security

nickmelis
2016-05-19 10:05
@karthik: what’s the question sorry?

karthik
2016-05-19 10:06
I am trying to init the chaincode from a jquery ajax call

karthik
2016-05-19 10:07
But it seems REST is not started for my peers

karthik
2016-05-19 10:09
I am trying to use REST api in a html page

nickmelis
2016-05-19 10:10
@karthik: I started looking at HyperLedger 2 days ago :smile:

karthik
2016-05-19 10:10
:sweat_smile:

karthik
2016-05-19 10:10
ok

joseph
2016-05-19 10:12
@karthik: did you resolve the problem?

karthik
2016-05-19 10:13
@joseph: what are you using command line or curl?

nickmelis
2016-05-19 10:15
@grapebaba: ChaincodeSpec.Type is not being serialised using the value in @SerializedName, any clue why?

nickmelis
2016-05-19 10:15
I end up with an error because the value “GO” (instead of 1) gets serialised in the JSON

karthik
2016-05-19 10:17
@joseph: There may be defect in event producer/consumer. You can ignore this error for now. The error is about notification (called event).

joseph
2016-05-19 10:17
I am using command line.

grapebaba
2016-05-19 10:18
@nickmelis: you can rise an issue

karthik
2016-05-19 10:18
@joseph: You can still get the chaincode name. This error is displayed in the peer terminal, right? I also dont know how to resolve this. Can someone help?

nickmelis
2016-05-19 10:19
@grapebaba: have you ever had the same problem?

grapebaba
2016-05-19 10:20
@nickmelis: i use the sub project example for test seems no issue

nickmelis
2016-05-19 10:21
it looks like it’s related to a GSon option

grapebaba
2016-05-19 10:21
just submit an issue or PR

grapebaba
2016-05-19 10:21
:wink:

nickmelis
2016-05-19 10:23
will do :slightly_smiling_face:

nickmelis
2016-05-19 10:44
just trying to understand what the real cause is

nickmelis
2016-05-19 10:44
how can I actually see the JSON being sent down to the fabric node?

nickmelis
2016-05-19 11:17
I was wrong, JSON looks good: ```{"jsonrpc":"2.0","method":"deploy","params":{"type":"1","chaincodeID":{"path":"https://github.com/hyperledger/fabric/blob/master/examples/chaincode/go/chaincode_example01/chaincode_example01.go","name":"mycc"},"ctorMsg":{"function":"init","args":["a","100","b","200"]},"secureContext":"jim"},"id":1}```

nickmelis
2016-05-19 11:18
any idea what may be causing this error on the node? ```Error unmarshalling chaincode request payload: json: cannot unmarshal string into Go value of type protos.ChaincodeSpec_Type```

ghaskins
2016-05-19 11:22
@nickmelis: the complaint is in regard to the field "type":”1”, i think it needs to be an integer or “GOLANG"

ghaskins
2016-05-19 11:22
integer 1 = “GOLANG"

nickmelis
2016-05-19 11:23
right… @grapebaba I can raise the issue now :slightly_smiling_face:

nickmelis
2016-05-19 11:23
@ghaskins: can I also use the string “GOLANG” (all capital letter)?

ghaskins
2016-05-19 11:23
oh sorry, i just read the backlog

ghaskins
2016-05-19 11:24
just rolled out of bed and was responding to the last message

nickmelis
2016-05-19 11:24
but you’re right… @grapebaba ’s REST client is serialising it as a string…rather than an integer

ghaskins
2016-05-19 11:24
honestly, im a little confused on when/where you can/need-to use the int vs string

nickmelis
2016-05-19 11:25
I’ll give it a try

sam
2016-05-19 11:26
has joined #fabric

grapebaba
2016-05-19 12:20
maybe the API implemention changed after i created the client

goodjoon
2016-05-19 12:35
has joined #fabric

gordonj
2016-05-19 13:08
has joined #fabric

nickmelis
2016-05-19 13:09
what does the URL format need to be when deploying chaincode? I’m looking at the example in https://github.com/hyperledger/fabric/blob/master/docs/API/CoreAPI.md#chaincode but if I copy that URL and paste it into a browser, it doesn’t seem to work

adriano
2016-05-19 14:50
has joined #fabric

isidoro.ghezzi
2016-05-19 15:17

nickmelis
2016-05-19 15:27
based on the very little knowledge I’ve got in the last few days, fabric is the blockchain node, whereas fabric-api “should” be a Java client

nickmelis
2016-05-19 15:27
unfortunately I couldn’t get fabric-api to work

isidoro.ghezzi
2016-05-19 15:30
I compiled fabric-api, but 4 tests fail: ``` mvn clean package -Djava.library.path=/usr/local/lib/ … Results : Tests in error: BIP39Test.bip39EncodeDecodeTest:70 » HyperLedger can not decrypt mnemonic ExtendedKeyTest.bip32PassphraseTest:113 » HyperLedger java.security.InvalidKey... GRPCClientTest.getNonExistingTransaction:55 » StatusRuntime UNKNOWN: Error:Fai... GRPCClientTest.sendTransaction:73 » StatusRuntime UNKNOWN: Error:Failed to lau... Tests run: 97, Failures: 0, Errors: 4, Skipped: 1 [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] hyperledger-client ................................. SUCCESS [ 0.996 s] [INFO] secp-binding ....................................... SUCCESS [ 2.555 s] [INFO] hyperledger-client-api ............................. FAILURE [ 13.017 s] [INFO] hyperledger-client-jms ............................. SKIPPED [INFO] hyperledger-client-jackson ......................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 16.884 s [INFO] Finished at: 2016-05-19T16:54:18+02:00 [INFO] Final Memory: 36M/552M ```

nickmelis
2016-05-19 15:31
I’m not sure who’s developing it, and if it’s actively being maintained

isidoro.ghezzi
2016-05-19 15:33
last commit was almost 1 hour ago.

nickmelis
2016-05-19 16:02

nickmelis
2016-05-19 16:03
when I then try to get the related transaction, I get a JSON of 37MB !!!!

nickmelis
2016-05-19 16:03
it’s all in the payload…but it should just be the chaincode shouldn’t it?

nickmelis
2016-05-19 16:04
why is it that huge?

cbf
2016-05-19 16:46
@nickmelis: This is the contribution from DAH and it is being actively maintained, but I think that they are still in the process of getting things sorted out in its new home

mikezaccardo
2016-05-19 19:18
, I’ve resolved my issue that I posted above — I was a bit out of date given recent code and documentation changes, but all good now.

mikezaccardo
2016-05-19 19:18
I’m currently developing this blueprint [https://github.com/cloudsoft/brooklyn-hyperledger] for deploying an HL cluster using Apache Brooklyn. Check it out if you’re interested!

kell
2016-05-19 19:20
has joined #fabric

ghaskins
2016-05-19 20:12
@sheehan @cbf Do we want to request/enforce DCO per-patch? Or is the one in the PR sufficient?

cbf
2016-05-19 20:14
@mdolan: what say you?

mdolan
2016-05-19 20:14
has joined #fabric

ghaskins
2016-05-19 20:14
I know in projects like the Linux kernel its per-patch, but they also don’t use github PRs so its not clear

ghaskins
2016-05-19 20:15
(or at least didnt last time I worked on the project)

sheehan
2016-05-19 21:17
@ghaskins: I think Facebook does it right. Just sign once, then a bot tags your PRs. https://code.facebook.com/cla I don’t understand the need to sign every PR

sheehan
2016-05-19 21:19
Seems like LF could have something similar

ry
2016-05-19 21:19
it makes the amount of digging to prove a commit is signed off much lower.

ry
2016-05-19 21:21
right now we’re building the gerrit system which will require per-patch signing (git commit -s, not gpg signing)

sheehan
2016-05-19 21:24
agree per patch makes more sense than PR as I can go back and edit the PR

isidoro.ghezzi
2016-05-20 00:00
PAUAs (please avoid using acronyms)

sheehan
2016-05-20 01:11
@nickmelis: Re payload size: Was just having this discussion with @muralisr and @keithsmith the other day. I agree it should only contain the chaincode source. @muralisr should know what’s actually in there. I think it’s sucking in way too much of the gopath

jonkrone
2016-05-20 01:35
has joined #fabric

joseph
2016-05-20 04:40
When I started a peer node CORE_SECURITY_ENABLED=true CORE_SECURITY_PRIVACY=true ./peer node start --peer-chaincodedev

joseph
2016-05-20 04:40
I got the errors

joseph
2016-05-20 04:40
04:38:07.226 [crypto] func1 -> INFO 008 Registering validator [vp] with name [vp]... 04:38:07.263 [crypto] getEnrollmentCertificateFromECA -> ERRO 009 [validator.vp] Failed invoking CreateCertficatePair [rpc error: code = 2 desc = "identity or token does not match"]. 04:38:07.264 [crypto] retrieveEnrollmentData -> ERRO 00a [validator.vp] Failed getting enrollment certificate [id=vp]: [rpc error: code = 2 desc = "identity or token does not match"] 04:38:07.264 [crypto] registerCryptoEngine -> ERRO 00b [validator.vp] Failed retrieving enrollment data [rpc error: code = 2 desc = "identity or token does not match"]. 04:38:07.264 [crypto] register -> ERRO 00c [validator.vp] Failed registering node crypto engine [rpc error: code = 2 desc = "identity or token does not match"]. 04:38:07.264 [crypto] register -> ERRO 00d Failed registering [vp]: [rpc error: code = 2 desc = "identity or token does not match"] 04:38:07.265 [crypto] RegisterValidator -> ERRO 00e Failed registering [vp]: [rpc error: code = 2 desc = "identity or token does not match"] 04:38:07.265 [crypto] func1 -> ERRO 00f Failed registering validator [vp] with name [vp] [rpc error: code = 2 desc = "identity or token does not match"].

joseph
2016-05-20 04:41
Who could please give me some ideas about it?

joseph
2016-05-20 04:41
I also started membership service.

nickmelis
2016-05-20 07:36
@cbf it would be super useful if fabric-api could be just imported as a dependency into a java project and used as a client

nickmelis
2016-05-20 07:36
@sheehan: RE Payload size: I see. This should be the case only with transaction that create chaincode though, am I right?


nickmelis
2016-05-20 10:28
why does the Query function does nothing?

garisingh
2016-05-20 10:47
@nickmelis: looks like it is basically a stateless chaincode example as no state is ever stored anywhere which would make Query a no-op

garisingh
2016-05-20 10:47
example02 is the one most commonly used to start with to look at Put / Get state

nickmelis
2016-05-20 10:47
right, in fact it looks like the 02 is the fully functional one

garisingh
2016-05-20 10:48
yep

simon
2016-05-20 11:06
that's how it should be

nickmelis
2016-05-20 11:08
I’m playing with example02, right after deploying the chaincode with two entities (Bob and Tom) I try to query for both, and I get an error saying {'Error':'Nil amount for Bob'}

nickmelis
2016-05-20 11:08
how’s it possible?

simon
2016-05-20 11:11
the deploy takes some time to execute

nickmelis
2016-05-20 11:12
even after some time, I get the same result

nickmelis
2016-05-20 11:12
how long does it take?

simon
2016-05-20 11:13
it needs to compile the chaincode - possibly even download a docker container first

simon
2016-05-20 11:13
on my machine it sometimes takes 40 sec

nickmelis
2016-05-20 11:14
when I get back the chaincode name, does it mean the code has been compiled?

simon
2016-05-20 11:14
no

simon
2016-05-20 11:14
it means that the request has been submitted

nickmelis
2016-05-20 11:15
even after a while, it still throws the same error

nickmelis
2016-05-20 11:15
and also nothing wrong in the logs

nickmelis
2016-05-20 11:16
(apart from the nil error)

karthik
2016-05-20 11:17
@nickmelis:have you changed something in the chaincode?


karthik
2016-05-20 11:18
@nickmelis: Are you initializing with Bob:100 and Tom :200?

simon
2016-05-20 11:18
unless you have some additional containers running, the container may still be being assembled

nickmelis
2016-05-20 11:18
@karthik: yes exactly, Bob 100 and Tom 200


nickmelis
2016-05-20 11:19
except for the names (Bob and Tom instead of a and b)

karthik
2016-05-20 11:21
you are using curl for this right?

nickmelis
2016-05-20 11:21
I’m going through a Java HTTP client

sheehan
2016-05-20 12:19
@nickmelis: yes, the huge size is only an issue on deploy

nickmelis
2016-05-20 12:43
does anyone have any clue why the invocation of example02 doesn’t fail but the query does?

nickmelis
2016-05-20 12:43
if I move 10 tokens from Bob to Tom, everything looks fine

nickmelis
2016-05-20 12:43
but then the query fails

simon
2016-05-20 12:59
nickmelis: can you provide complete debug logs?

nickmelis
2016-05-20 12:59
@simon: sure. Do you need the query only or deploy and invoke too?

simon
2016-05-20 12:59
of the peers

simon
2016-05-20 13:00
entire log

nickmelis
2016-05-20 13:04
it’s quite big, can I paste it in here?


nickmelis
2016-05-20 13:05
request: ```{ "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID":{ "path":"http://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02" }, "ctorMsg": { "function":"init", "args":["Bob", "1000", "Tom", "2000"] } }, "id": 1 }```

nickmelis
2016-05-20 13:06
response: ```{ "jsonrpc": "2.0", "result": { "status": "OK", "message": "9aed28a9c592b2dd43be4045698e5ed2da1605c83387e944b80237e1ab9e4ba569463723ff6469415aa1a9bb47661588bfe93ea1c62340003fb0873265ad7d61" }, "id": 1 }```

nickmelis
2016-05-20 13:07
ok something has changed…the query worked now

muralisr
2016-05-20 13:10
@nickmelis: just an FYI… this is not latest code (the “writing file …” log was removed recently)

nickmelis
2016-05-20 13:10
@muralisr: how recently? I think I got all the code a few days ago

muralisr
2016-05-20 13:29

nickmelis
2016-05-20 13:37
forget the error above, I was just passing the parameters in the wrong order during creation

nickmelis
2016-05-20 13:37
however my question now is: how do I know when the chaincode has been deployed and is ready to be invoked?

nickmelis
2016-05-20 13:37
if I query the contract just before having deployed it, I get nulls

nickmelis
2016-05-20 14:14
@muralisr: apparently that PR has been merged 4 days ago, am I right? It may be I checked out the code before that

muralisr
2016-05-20 14:16
@nickmelis: no problem at all… I just wanted to let you know so you are not troubled by large logs

nickmelis
2016-05-20 14:16
thanks, I’ll update at some point and check if all those logs are gone

muralisr
2016-05-20 14:16
sure

muralisr
2016-05-20 14:18
also note that to get debug logs (which WON'T have the “writiging file…”) a quick way would be to add CORE_LOGGING_LEVEL=debug env

nickmelis
2016-05-20 14:18
ok…..I think I just have debug now

nickmelis
2016-05-20 14:34
is it possible to remove some chaincode from the blockchain?

nickmelis
2016-05-20 14:35
remove or deactivate?

ghaskins
2016-05-20 14:57
@nickmelis: full lifecycle management (deploy, upgrade, terminate) is planned but I think the support for anything but deploy is not yet implemented

nickmelis
2016-05-20 14:58
I see…thanks @ghaskins

ghaskins
2016-05-20 14:59
@muralisr probably has a better handle on timelines for this

nickmelis
2016-05-20 15:10
Thanks @ghaskins. Are you all involved in the project? Are you all developers? I am quite new here :slightly_smiling_face:

ghaskins
2016-05-20 15:35
@nickmelis: I am a hyperledger/fabric maintainer and an active developer

ghaskins
2016-05-20 15:36
welcome to the community!

nickmelis
2016-05-20 15:36
pleased to meet you…I believe this project really has a huge potential

ghaskins
2016-05-20 15:37
likewise and likewise

joseph
2016-05-21 14:42
I understand that we deploy chaincode ony once. In practice, the chaincode can be updated in time. So how to redeploy in an effective way?

muralisr
2016-05-21 15:26
@joseph @nickmelis currently, there is not satisfactory solution to “redeploy” and in general maintenance. The best you can do is “deploy” a variation. As @ghaskins pointed out there is planning in progress to upgrade and terminate no specific timeline at the moment unfortunately…but should happen after due process in the community

joseph
2016-05-21 15:29
I see.

joseph
2016-05-21 15:31
by the way, a state of a chaincode that stored in the world state is cloned to all validators or it is kept locally ?

ghaskins
2016-05-21 15:41
Ignoring confidentiality constraints, cloned

joseph
2016-05-21 15:44
Could you please explain it with more information, @ghaskins ?

ghaskins
2016-05-21 15:55
I'm out on mobile right now. Will later

dan.irons
2016-05-21 17:57
has joined #fabric

joseph
2016-05-22 09:10
I run a chaincode with security enabled.

joseph
2016-05-22 09:11
But I always get a empty certificate.

joseph
2016-05-22 09:12
who please give me some idea about this problem?

garisingh
2016-05-22 09:16
@joseph - which certificate are you looking for?

garisingh
2016-05-22 09:20
@joseph - to answer your state question above, in the current implementation of the fabric, chaincode runs on all validating nodes and therefore the state produced by any given chaincode is available on all validating nodes as well. technically the state itself is not "cloned" but rather what happens is that the functions you invoke against chaincode are actually executed against chaincode on each validating node (the one exception is when a node falls behind / reconnects to the network, but that is a different discussion)

joseph
2016-05-22 09:21
stub.GetCallerMetadat()

joseph
2016-05-22 09:21
@garisingh: I want to get a deployer certificate.

joseph
2016-05-22 09:23
@garisingh: thank your for your answer for the question above.

garisingh
2016-05-22 09:27
@joseph - the certificate of the client which called a chaincode function is available via `stub.GetCallerCertificate()`

garisingh
2016-05-22 09:31
the `stub.GetCallerMetaData()` function will only return info if you actually included metadata in the deploy and / or invoke transaction

joseph
2016-05-22 09:33
stub.getCallerCertificate() is returning a certificate.

joseph
2016-05-22 09:33
@garisingh: Thanks

joseph
2016-05-22 09:34
For confirmation, is that a deployer certificate?

garisingh
2016-05-22 09:34
not sure what you mean by "deployer" certificate?

joseph
2016-05-22 09:36
I looked some chaincode examples.

joseph
2016-05-22 09:37
They said we should get a deployer certificate by calling stub.GetCallerMetata() and so on.

garisingh
2016-05-22 09:41
which examples? for stub.GetCallerMetata() to return anything, you actually have to send metadata with the transaction (either a deploy or invoke transaction). You can see this here: https://github.com/hyperledger/fabric/blob/master/examples/chaincode/go/asset_management/app/app_internal.go#L129

joseph
2016-05-22 09:43
I was missing something. Now I got it.

joseph
2016-05-22 09:43
Thanks @garisingh .

garisingh
2016-05-22 09:43
sure thing

joseph
2016-05-22 09:57
@garisingh: For further information,


joseph
2016-05-22 09:59
I want to get a certificate that I can produce a role-based access feature.

joseph
2016-05-23 03:08
How to get a signature of a caller?

joseph
2016-05-23 03:08
Who please give me some ideas about this?

nickmelis
2016-05-23 13:16
getting the following error when trying to use the /registrar endpoint:

nickmelis
2016-05-23 13:16
```13:12:10.870 [crypto] Login -> INFO 02d Registering client [nick] with name [nick]... 2016/05/23 13:12:11 grpc: ClientConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp [::1]:50051: getsockopt: connection refused"; Reconnecting to "localhost:50051" 2016/05/23 13:12:13 grpc: ClientConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp [::1]:50051: getsockopt: connection refused"; Reconnecting to "localhost:50051" 2016/05/23 13:12:13 Failed to dial localhost:50051: grpc: timed out trying to connect; please retry. 13:12:13.549 [crypto] callECAReadCACertificate -> ERRO 02e [client.nick] Failed requesting read certificate [rpc error: code = 2 desc = "grpc: the client connection is closing”].```

nickmelis
2016-05-23 13:17
who should be listening on 50051? Is there anything else I need to do other than starting my peer?

ghbonneville
2016-05-23 20:02
has joined #fabric

grapebaba
2016-05-24 00:46
now we can just config one CA server address in peer config file, right?

maruthi
2016-05-24 02:04
has joined #fabric

grapebaba
2016-05-24 02:07
@nickmelis: 50051 should be memberservice

grapebaba
2016-05-24 02:11
did you forget start memberservice?

mikezaccardo
2016-05-24 05:53
Hi, I’ve stood up a cluster of 4 validating peers (with pbft consensus plugin and security enabled) as well as a member services node and everything seems to be functioning properly. I’ve deployed, invoked, and queried the example chaincode [https://github.com/hyperledger/fabric/tree/master/examples/chaincode/chaintool/example02] using the REST API and have moved onto the asset management chaincode [https://github.com/hyperledger/fabric/tree/master/examples/chaincode/go/asset_management]. However, I can’t seem to figure out how to interact with this chaincode via the REST API. Are there any documented REST calls for it / has anyone successfully done this themselves? Many thanks! cc: @guglielmo_n @sjcorbett

joseph
2016-05-24 07:01
The certificate that returns from /registrar/{enrollmentID}/ecert and the certificate that returns stub.getCallerCertificate() are the same?

joseph
2016-05-24 07:03
the second question, I need to get stub.GetCallerMetadata() to verify sign.

joseph
2016-05-24 07:03
But it always returns empty.

ibmamnt
2016-05-24 09:22
It seems the payload has more information than transaction. For example, if I query like /transactions/{uuid}, I get like: ``` "uuid": "7362fa44-a551-46c7-b530-1df894b79d55", "payload": "Cp0BCAESgwESgAE2YTVlOGRlOTRkMjM5NzIyYzA1MjliNjk5ODk2OWUzZGQ4M2U1ZTUzNjAzNWU2ZDFkNmIwOTM4NzhkNDgxZjlmNzhjNzUwMmMyOTViMDEwNGNhN2M2OWQ3NjI1ZWQzYjZmNjk2OGE2ZmU0NjlhNWYxMjk5ZTI1ZGVlOWI1Y2ZjYRoTCgZpbnZva2USAWESAWMSAzMzMg=="```

ibmamnt
2016-05-24 09:26
I can not decode payload by base64decode function (e.g base64 -d command line, or python it gives extra message, like: ```>>> msg='Cp0BCAESgwESgAE2YTVlOGRlOTRkMjM5NzIyYzA1MjliNjk5ODk2OWUzZGQ4M2U1ZTUzNjAzNWU2ZDFkNmIwOTM4NzhkNDgxZjlmNzhjNzUwMmMyOTViMDEwNGNhN2M2OWQ3NjI1ZWQzYjZmNjk2OGE2ZmU0NjlhNWYxMjk5ZTI1ZGVlOWI1Y2ZjYRoTCgZpbnZva2USAWESAWMSAzMzMg==' >>> msg.decode('base64') '\n\x9d\x01\x08\x01\x12\x83\x01\x12\x80\x016a5e8de94d239722c0529b6998969e3dd83e5e536035e6d1d6b093878d481f9f78c7502c295b0104ca7c69d7625ed3b6f6968a6fe469a5f1299e25dee9b5cfca\x1a\x13\n\x06invoke\x12\x01a\x12\x01c\x12\x03332'```

ibmamnt
2016-05-24 09:26
I think the spec has changed. Is there any documentation for it ?

yingfeng
2016-05-24 10:28
chaincode rest api always meets time out when i setup a simple develop enviornment: 1. docker run --rm -it -e CORE_VM_ENDPOINT=http://172.17.0.1:2375 -e CORE_PEER_ID=vp1 -e CORE_PEER_ADDRESSAUTODETECT=true -e CORE_PEER_DISCOVERY_ROOTNODE=172.17.0.2:30303 hyperledger-peer peer node start --peer-chaincodedev 2. CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=172.17.0.2:30303 ./chaincode_example02 3. curl -H "Content-Type: application/json" --data @deploy.json http://172.17.0.2:5000/chaincode where deploy.json is: { "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID":{ "name": "mycc" }, "ctorMsg": { "function":"init", "args":["a", "100", "b", "200"] } }, "id": 1 } 4. the calling of curl meets time out frequently, sometimes it's successful. why does it happen?

yingfeng
2016-05-24 11:10
I've got the reason: when development enviornment is used, don't use docker to start peer node

mcrafols
2016-05-24 15:36
hi! does someone know if a chaincode that's not on github can be deployed?

mcrafols
2016-05-24 15:37
@ghaskins: you told me to put it in the $GOPATH/src and set the path from there

mcrafols
2016-05-24 15:37
I have not been succesful in setting the path to the chaincode

cbf
2016-05-24 15:37
needs to be fully qualified

cbf
2016-05-24 15:38
eg

ghaskins
2016-05-24 15:38
@mcrafols: it seems that at some point (im guessing with go1.6), fully qualified paths seem to work

ghaskins
2016-05-24 15:39
it used to be true that type=GOLANG required $GOPATH/src relative paths, but a colleague of mine pointed out recently that this doesn’t appear to be true any more

ghaskins
2016-05-24 15:40
to be clear, it must be an FQP w.r.t. the peer that will handle the deploy()

ghaskins
2016-05-24 15:40
not the client (unless you are running the client on the same machine, in which case they are equivalent)

ghaskins
2016-05-24 15:41
yes, we know this is annoying, yes, it is being worked on, but for now, thats how it works...

nickmelis
2016-05-24 15:42
@mcrafols: the only way I’ve found to deploy and test a chaincode without using a GitHub repo is by following this guide: https://github.com/hyperledger/fabric/blob/master/docs/API/SandboxSetup.md

nickmelis
2016-05-24 15:42
It’s some sort of development sandbox, so I don’t know if this is what you’re looking for

mcrafols
2016-05-24 15:43
@nickmelis: yes, I have developed the chaincode on it, but wan't to do the next step and deploy it over a VP network

nickmelis
2016-05-24 15:43
yeah I think we’re all waiting for it :slightly_smiling_face:

ghaskins
2016-05-24 15:43
@mcrafols: your only choices right now are to have the chaincode available via URL, or installed in a FQP on the peer that you plan to send the deploy() to

ghaskins
2016-05-24 15:44
you only need to have it accessible on the peer that handles the deploy() directly, as the first peer will package and distribute the code to the others after that

nickmelis
2016-05-24 15:44
@ghaskins: what’s FQP?

ghaskins
2016-05-24 15:44
fully qualified path

ghaskins
2016-05-24 15:45
i.e. root relative

nickmelis
2016-05-24 15:45
right, so to have it in $GOROOT/src?

ghaskins
2016-05-24 15:46
if its not fqp (meaning, does not have a root slash, e.g. “my/awesome/chaincode”, then I think it will prepend $GOPATH/src to that

ghaskins
2016-05-24 15:46
if it has a leading slash, then its an FQP taken verbatim

ghaskins
2016-05-24 15:46
e.g. /home/nickmelis/my/awesome/chaincode

mcrafols
2016-05-24 15:47
would this work when the VP runs in the docker image?

ghaskins
2016-05-24 15:47
if you put your chaincode in the docker image with it :wink:

nickmelis
2016-05-24 15:47
right, so you’re saying I can put my chaincode into /home/nickmelis/my/awesome/chaincode on the VP and then call deploy() via REST passing the fully qualified path?

ghaskins
2016-05-24 15:47
bottom line: _not_ using URL means it has to be in the local filesystem of the peer that will accept the request

ghaskins
2016-05-24 15:48
@nickmelis: yes

ghaskins
2016-05-24 15:48
@mcrafols: if you are using a docker container for your peer, the local fs for the peer is the docker container

nickmelis
2016-05-24 15:48
@ghaskins: cool, thanks! that was useful

mcrafols
2016-05-24 15:49
@ghaskins: $GOPATH/src/github.com/hyperledger/fabric/core/container ?

ghaskins
2016-05-24 15:49
@mcrafols: how are you launching the peer?

mcrafols
2016-05-24 15:50
docker run --rm -it -e CORE_VM_ENDPOINT=http://172.17.0.1:2375 -e CORE_PEER_ID=vp0 -...

mcrafols
2016-05-24 15:50
because as far as I know launching it outside the image is challenging

mcrafols
2016-05-24 15:50
at least

ghaskins
2016-05-24 15:50
i assume at the end of that you are referencing hyperledger-peer

mcrafols
2016-05-24 15:50
hyperledger-peer peer node start

mcrafols
2016-05-24 15:51
yes sorry

ghaskins
2016-05-24 15:51
right, ok, so if you run “docker images” you will see “hyperledger-peer” is a container on your system

mcrafols
2016-05-24 15:51
yes

ghaskins
2016-05-24 15:51
that image was created (directly or indirectly) via “make peer-image” at some point earlier

nickmelis
2016-05-24 15:51
ok I’ve just tried with the FQP and it works…great news :slightly_smiling_face:

ghaskins
2016-05-24 15:52
@nickmelis: awesome!

ghaskins
2016-05-24 15:52
@mcrafols: so you have a few different choices

mcrafols
2016-05-24 15:52
@nickmelis: are you running you VP without docker?

nickmelis
2016-05-24 15:52
@mcrafols: yes I am…single peer

ghaskins
2016-05-24 15:52
#1 inject what you want into either hyperledger-peer (or create a derivative image from hyperledger-peer)

ghaskins
2016-05-24 15:53
#2 keep using hyperledger-peer but use a volume mount to make your chaincode visible to the container

ghaskins
2016-05-24 15:53
#3 stop using docker and run the peer directly

ghaskins
2016-05-24 15:53
it sounds like @nickmelis is using option 3

nickmelis
2016-05-24 15:54
I am, although I am only running a single node

nickmelis
2016-05-24 15:54
not a proper network...

ghaskins
2016-05-24 15:54
yeah, for simple things that works fine

nickmelis
2016-05-24 15:54
yeah exactly

ghaskins
2016-05-24 15:54
FWIW, I very rarely do anything but exactly this

ghaskins
2016-05-24 15:54
I tend to be testing chaincode function and dont care about consensus

nickmelis
2016-05-24 15:55
it would be really useful to have visibility over the fabric roadmap and see what’s being planned for the next few months

mcrafols
2016-05-24 15:55
regarding #3 many people have had problems deploying it outside docker, right?

ghaskins
2016-05-24 15:55
@mcrafols, not sure why…the host environment (at least if you are using vagrant) is virtually identical to the docker environment

ghaskins
2016-05-24 15:56
so, unless you need multiple nodes or isolation, it should be more or less the same

ghaskins
2016-05-24 15:56
you are limited that you can only run 1 instance without rigging all the paths/ports (like /var/hyperledger and port 30303)

ghaskins
2016-05-24 15:56
but it should be operationally similar

ghaskins
2016-05-24 15:57
@nickmelis: I think we all want that :wink:

mcrafols
2016-05-24 15:57
ok, but I am trying with multiple VP because I have two clients and they can't point to the same VP

nickmelis
2016-05-24 15:57
@ghaskins: sorry guys, I don’t want to make pressure on you :stuck_out_tongue:

ghaskins
2016-05-24 15:58
@mcrafols: ok, then you need docker

ghaskins
2016-05-24 15:58
so, you can attack from option 1 or 2, 2 is probably the better choice IMO

ghaskins
2016-05-24 15:58
hold on, let me look up the option you want


ghaskins
2016-05-24 16:02
@ghaskins uploaded a file: https://hyperledgerproject.slack.com/files/ghaskins/F1BCHFPC2/-.sh and commented: for instance

ghaskins
2016-05-24 16:03
this maps /local-dev on the host to /local-dev in the container

ghaskins
2016-05-24 16:04
change the paths to taste, though this is probably a good configuration if you are using vagrant+LOCALDEVDIR option

ghaskins
2016-05-24 16:04
once that is done, you should be able to use an FQP like /local-dev/path/to/my/awesome/chaincode and the peer will be able to see it

mcrafols
2016-05-24 16:05
oh great (awesome indeed)! let me try it

nickmelis
2016-05-24 16:10
cos every node need to have access to the chaincode, right? and with a shared folder you just drop the chaincode in there, am I right?

mcrafols
2016-05-24 16:10
not every node

mcrafols
2016-05-24 16:10
just the one where you are doing the deploy

nickmelis
2016-05-24 16:10
then why do you need the other nodes to have access to the chaincode?

mcrafols
2016-05-24 16:11

mcrafols
2016-05-24 16:11
that allows to build several peers

mcrafols
2016-05-24 16:11
you run them in docker images (it's like having a VM for every peer)

mcrafols
2016-05-24 16:12
so this peers run in a VM that cannot access the host filesystem

nickmelis
2016-05-24 16:13
ok you’re saying you run ALL the nodes in docker?

nickmelis
2016-05-24 16:13
in this case you just need to share a folder from the host to ONE of your docker images, am I right?

mcrafols
2016-05-24 16:13
yes every node is a docker image

mcrafols
2016-05-24 16:13
exactly

nickmelis
2016-05-24 16:13
ok got it!

nickmelis
2016-05-24 16:14
if you deploy on one node, does it then get propagated to the other nodes automatically?

mcrafols
2016-05-24 16:14
yes via consensus

nickmelis
2016-05-24 16:14
so I can deploy on node 1 and invoke on node 2?

mcrafols
2016-05-24 16:14
that's the nice thing of distributed systems

mcrafols
2016-05-24 16:15
like blockchain

nickmelis
2016-05-24 16:15
yeah I know this is the case with Ethereum for example, I just thought it wasn’t ready yet

nickmelis
2016-05-24 16:15
so the only issue to solve is make the chaincode source available to ONE of the validating peers, right?

mcrafols
2016-05-24 16:16
yes

nickmelis
2016-05-24 16:16
ok I got it now!

ghaskins
2016-05-24 16:18
sorry, was in the other channel, but @mcrafols is right

ghaskins
2016-05-24 16:18
only the peer that receives the actual deploy needs to access the URL/filesystem

ghaskins
2016-05-24 16:18
all other nodes get a copy via the consensus network

mcrafols
2016-05-24 16:19
I am running this command: vagrant@hyperledger-devenv:v0.0.9-66ca505:/local-dev$ docker run --rm -it -e CORE_VM_ENDPOINT=http://172.17.0.1:2375 -e CORE_PEER_ID=vp0 -e CORE_PEER_ADDRESSAUTODETECT=true -v /local-dev:/local-dev hyperledger-peer peer node start

mcrafols
2016-05-24 16:20
@ghaskins: from what you suggested, where /bin/bash would go?

ghaskins
2016-05-24 16:38
@mcrafols: sorry, that was just for my example

ghaskins
2016-05-24 16:38
you dont need/want it

ghaskins
2016-05-24 16:39
should have been your same command + “-v /local-dev:/local-dev”, thats it

ghaskins
2016-05-24 16:39
looks like you have it right

mcrafols
2016-05-24 16:40
so I have the chaincode right to the vagrant /local-dev/

mcrafols
2016-05-24 16:40
and then this

mcrafols
2016-05-24 16:40
vagrant@hyperledger-devenv:v0.0.9-66ca505:/opt/gopath/src/github.com/hyperledge r/fabric/peer$ CORE_PEER_ADDRESS=172.17.0.2:30303 ./peer chaincode deploy -p /l ocal-dev -c '{"Function":"init", "Args": []}'

mcrafols
2016-05-24 16:41

mcrafols
2016-05-24 16:42
keeps saying path does not exist

ghaskins
2016-05-24 16:42
if your chaincode in the same dir you volume mounted, I would have epxected that to work

ghaskins
2016-05-24 16:42
you can trouble shoot with bash

ghaskins
2016-05-24 16:42
at the end of your peer-launch, instead of “peer node start” put “/bin/bash

ghaskins
2016-05-24 16:43
and then cd /local-dev, does it look like you expect>

ghaskins
2016-05-24 16:43
?

mcrafols
2016-05-24 16:43
yes

mcrafols
2016-05-24 16:43
the chaincode is there

ghaskins
2016-05-24 16:45
hmm, ok, i thought FQP worked, let me try something

mcrafols
2016-05-24 16:45
well @nickmelis was succesful using the FQP

ghaskins
2016-05-24 16:46
(worst case, you could use /local-dev/src/mycode with GOPATH=/local-dev

ghaskins
2016-05-24 16:46
but yeah, and I have some colleagues here that have been using FQP too, IIUC

ghaskins
2016-05-24 16:46
the bigger challenge was getting your code into the container, we hve that now

ghaskins
2016-05-24 16:46
now just need to work out the mechanics of the specification

mcrafols
2016-05-24 16:48
wait

mcrafols
2016-05-24 16:48
when I do the /bin/bash

mcrafols
2016-05-24 16:48
it get to this path root@8988af087f27:/opt/gopath/src/github.com/hyperledger/fabric/peer#

ghaskins
2016-05-24 16:51
thats fine, thats because the hyperledger-peer has a CWD set

ghaskins
2016-05-24 16:51
do a “df”, you should see your /local-dev mounted

mcrafols
2016-05-24 16:52
Filesystem 1K-blocks Used Available Use% Mounted on none 40636768 4703700 33845800 13% / tmpfs 2024096 0 2024096 0% /dev tmpfs 2024096 0 2024096 0% /sys/fs/cgroup none 249963860 83274864 166688996 34% /local-dev /dev/sda1 40636768 4703700 33845800 13% /etc/hosts shm 65536 0 65536 0% /dev/shm

mcrafols
2016-05-24 16:53
I thought that maybe it couldn't find the folder because it was looking from the .../peer path

ghaskins
2016-05-24 16:57
no, it should be fine since it was fully qualified

ghaskins
2016-05-24 16:57
to prove it, try this: docker run -it -v /local-dev:/local-dev hyperledger-peer ls /local-dev

ghaskins
2016-05-24 16:57
you should see whatever you mounted

ghaskins
2016-05-24 16:58
this is probably a stupid question: but are you sure you are directing your deploy to the right container?

mcrafols
2016-05-24 16:59
yes to the VP that I ran with -v /...

ghaskins
2016-05-24 16:59
ok

ghaskins
2016-05-24 17:00
did the ls test pan out?

mcrafols
2016-05-24 17:00
when I run your command I see the contents in the /local-dev of vagrant

ghaskins
2016-05-24 17:00
that sounds right to me

ghaskins
2016-05-24 17:00
is that not what you expected?

mcrafols
2016-05-24 17:00
it is

mcrafols
2016-05-24 17:00
and the chaincode is there

ghaskins
2016-05-24 17:00
ok

ghaskins
2016-05-24 17:01
let me ask you this: is /local-dev a chaincode package, or a single .go file?

ghaskins
2016-05-24 17:01
@nickmelis: when you launch with FQP, are you specifying the folder or a .go file ?

mcrafols
2016-05-24 17:02
a single .go file

ghaskins
2016-05-24 17:02
@mcrafols: not sure this will work, but try /local-dev/file.go

ghaskins
2016-05-24 17:02
i wonder if there is some goofiness because im sure your package isnt “local-dev"

ghaskins
2016-05-24 17:03
if the direct file doesnt work, try moving the file to its proper package folder under local-dev

mcrafols
2016-05-24 17:05
what do you mean by proper package folder?

mcrafols
2016-05-24 17:05
it does not work

mcrafols
2016-05-24 17:06
if i set the path to . then it tries to deploy something

mcrafols
2016-05-24 17:06
but then does this

ghaskins
2016-05-24 17:06
well, you know how go has packages like “foo/bar”, which would expect any files in foo/bar/*.go to have “package bar” at the top

mcrafols
2016-05-24 17:06

ghaskins
2016-05-24 17:07
thats weird, it looks like it built something

mcrafols
2016-05-24 17:07
yeah I get the same if I try the path /

mcrafols
2016-05-24 17:09

mcrafols
2016-05-24 17:09
I don't understand what's trying to deploy

mcrafols
2016-05-24 17:09
but those are the only paths that have "worked"

ghaskins
2016-05-24 17:09
at this point, probably best if @nickmelis or someone else that has used FQP could chime in

ghaskins
2016-05-24 17:09
one last thing to try:

ghaskins
2016-05-24 17:10
make a GOPATH like structure under your /local-dir and then set it

ghaskins
2016-05-24 17:10
e.g. docker run …. -e GOPATH=/local-dev ….

ghaskins
2016-05-24 17:11
then use a relative gopath name

mcrafols
2016-05-24 17:12
trying the deploy like this? CORE_PEER_ADDRESS=172.17.0.2:30303 ./peer chaincode deploy -p $GOPATH -c '{"Function":"init", "Args": []}'

ghaskins
2016-05-24 17:12
no i mean on the vp0 launch

ghaskins
2016-05-24 17:13
say install your code in /local-dev/src/mycode

mcrafols
2016-05-24 17:13
yeah I did the launch like this

mcrafols
2016-05-24 17:13
POINT=http://172.17.0.1:2375 -e CORE_PEER_ID=vp0 -e CORE_PEER_ADDRESSAUTODETECT =true -e GOPATH=/local-dev -v /local-dev:/local-dev hyperledger-peer peer node start

ghaskins
2016-05-24 17:13
ok, good

ghaskins
2016-05-24 17:13
now, using my example above, you would do “peer chaincode deploy -p mycode …"

mcrafols
2016-05-24 17:14
mycode being the go file?

ghaskins
2016-05-24 17:14
im not sure if it wants a package or file

ghaskins
2016-05-24 17:14
try both

mcrafols
2016-05-24 17:15
i think the package

mcrafols
2016-05-24 17:15
but i'll try both

mcrafols
2016-05-24 17:18
it seems that it deploys something

mcrafols
2016-05-24 17:18
because I made the folder eNot

mcrafols
2016-05-24 17:18
and trying the deploy it gives this error

mcrafols
2016-05-24 17:20

mcrafols
2016-05-24 17:22
it is kind of getting something, because if I deploy also specifying the file.go

mcrafols
2016-05-24 17:22
it says

mcrafols
2016-05-24 17:23
Error: Error building chaincode: rpc error: code = 2 desc = "Error getting chain code package bytes: code does not exist file /local-dev/src/eNot/file.go is not dir\n"

mcrafols
2016-05-24 17:24
@ghaskins: I'll keep trying tomorrow to see if I am succesful

mcrafols
2016-05-24 17:24
thank you very much!! your help is very much needed!

ghaskins
2016-05-24 17:24
no problem, sorry I wasnt more helpful

mcrafols
2016-05-24 17:25
well it seems that now it gets to the folder

ghaskins
2016-05-24 17:25
(I dont use type=GOLANG and I am typically launching with devmode)

mcrafols
2016-05-24 17:25
still extremely helpful!

ghaskins
2016-05-24 17:46
@mcrafols: my colleague confirmed it is the directory you pass in with -p

ghaskins
2016-05-24 17:46
so, not sure why local-dev didnt work, BUT, in our case the name of the go file was the same as the dir

ghaskins
2016-05-24 17:47
e.g. /local-dev/foo/foo.go as specified with /local-dev/foo

ghaskins
2016-05-24 17:47
perhaps that is part of the story

tsariounov
2016-05-24 18:25
probably, if go builds it, it by default names the executable after the directory. all our cc's are named after the directory.

ghaskins
2016-05-24 18:37
thanks @tsariounov

arnaud
2016-05-24 20:30
Looking at the growing list of issues it's clear that we need to get better at giving people proper guidance as to what ought to be raised as an issue

arnaud
2016-05-24 20:31
having usage questions from newcomers mixed in with real bugs is rather messy

sheehan
2016-05-24 20:36
maybe we can update the issue template (https://github.com/hyperledger/fabric/blob/master/.github/ISSUE_TEMPLATE.md) with something like "For general purpose questions, please use [StackOverflow](http://stackoverflow.com/questions/tagged/hyperledger)."

arnaud
2016-05-24 20:50
@sheehan: good idea!

cbf
2016-05-24 21:00
: there are a good number of stackoverflow questions (and some answers) and generally we should all be vigilant and responsive…

cbf
2016-05-24 21:01
I have also noted that when people talk about Hyperledger fabric, they often just shorten it to “Hyperledger"

cbf
2016-05-24 21:01
I’ve started editing responses and questions when I see this but those need to be peer reviewed http://stackoverflow.com/questions/36910077/where-are-chaincodes-executed/36910078#36910078


arnaud
2016-05-24 22:32
@sheehan: by the way, if you update the template I'd appreciate if you could remove the space that's between the [] for all the things we need to check

sheehan
2016-05-24 22:33
ok

arnaud
2016-05-24 22:33
that way one can simply add an x without having to also delete the space

arnaud
2016-05-24 22:33
if a space is left the formatting doesn't work

sheehan
2016-05-24 22:44
@arnaud: See PR 1572 and 1573

zaki
2016-05-24 23:05
You can "subscribe" to a tag in StackOverflow to get emails on questions

arnaud
2016-05-24 23:05
@sheehan: looks good! thanks for the prompt response :slightly_smiling_face:

arnaud
2016-05-24 23:06
and now I know where this thing is hidden! :smile:

cbf
2016-05-24 23:43
@tamas: LF has Jenkins running... #ci-pipeline is where we are discussing. would be good to start migrating your jenkins for the fabric-api

joseph
2016-05-25 02:16
I run a chaincode in sanbox environment.

joseph
2016-05-25 02:16
I want to get metadat by calling stub.GetCallerMetadata().

joseph
2016-05-25 02:16
It returns empty.

joseph
2016-05-25 02:17
Is it reasonable for value of the metadata is empty?

muralisr
2016-05-25 02:54
The metadata is something user passes at the time of deployment. It can be anything. So if you didn’t pass anything, it can be empty

muralisr
2016-05-25 02:55
metadata handling is exemplified in fabric/examples/chaincode/go/asset_management_with_roles - both in the chaincode and in the test driver

joseph
2016-05-25 03:00
I got it.

joseph
2016-05-25 03:01
by the way, I verify a signature like this

joseph
2016-05-25 03:02
callerCert, err := stub.GetCallerCertificate(); sigma, err := stub.GetCallerMetadata() if err != nil { return false, nil, errors.New("Failing retrieving metadata") } payload, err := stub.GetPayload() if err != nil { return false, nil, errors.New("Failing getting payload") } binding, err := stub.GetBinding() if err != nil { return false, nil, errors.New("Failing getting binding") } eccLogger.Debug("passed certificate [%x]", adminCert) eccLogger.Debug("passed sigma [% x]", sigma) eccLogger.Debug("passed payload [% x]", payload) eccLogger.Debug("passed binding [% x]", binding) ok, err := stub.VerifySignature( adminCert, sigma, append(payload, binding...), )

joseph
2016-05-25 03:03
I always get the verify signature failing.

joseph
2016-05-25 03:04
@muralisr: do you have any idea about it?

joseph
2016-05-25 03:15
why does all information come from one stub but verify itself signature failed?

joseph
2016-05-25 04:48
I saw an API to verify signature.

joseph
2016-05-25 04:48
// VerifySignature ... func (stub *ChaincodeStub) VerifySignature(certificate, signature, message []byte) (bool, error) { // Instantiate a new SignatureVerifier sv := ecdsa.NewX509ECDSASignatureVerifier() // Verify the signature return sv.Verify(certificate, signature, message) }

joseph
2016-05-25 04:48
How do we get the signature to send to the API?

mikezaccardo
2016-05-25 05:12
@joseph we are facing the exact same problem right now!

mikezaccardo
2016-05-25 05:13
it seems to want a DER which is a binary representation, yet we need to POST it in the “metadata” field which requires base64 encoding


mikezaccardo
2016-05-25 05:14
GET /registrar/{enrollmentID}/ecert GET /registrar/{enrollmentID}/tcert

mikezaccardo
2016-05-25 05:14
that gets url-encoded certs

joseph
2016-05-25 05:15
we parse ecert to get the signature?

duncanjw
2016-05-25 05:16
has joined #fabric

duncanjw
2016-05-25 05:30
@joseph: we drilled down on same code and found derToX509Certificate(certificate) which is fine if called programmatically but as you say we can’t pass binary metadata via POST


mikezaccardo
2016-05-25 05:53
it looks like the intention is not to use the REST API for this example, but instead use the apps: https://github.com/hyperledger/fabric/tree/master/examples/chaincode/go/asset_management/app

mcrafols
2016-05-25 08:41
@ghaskins: I finally could deploy it!


mcrafols
2016-05-25 08:44
The previous path is a local path relative to $GOPATH in the docker image

mcrafols
2016-05-25 08:45
(that's why yesterday by setting the $GOPATH=local-dev I was able to access my chaincode)

mcrafols
2016-05-25 08:46
It is somewhat confusing that the deploy path is github.com.... because it leads to think that it is getting the chaincode from github but it is really getting a local copy (just that the folder is named http://github.com)

mcrafols
2016-05-25 08:48
I have also tried having a different name in the folder than in the chaincode file and it works

mcrafols
2016-05-25 08:50
Finally, I got the chaincode in the docker image just by making the folder in the vagrant path /opt/gopath/src/github.com/hyperledger/fabric/peer and then building the image (go test -run BuildImage_Peer)

mcrafols
2016-05-25 08:53
I guess that if in the node start it is set -v local-dev:localdev -e GOPATH=/local-dev then the chaincode could be deployed too and it could be accessed from outside the docker image too

nickmelis
2016-05-25 09:13
@mcrafols: that is useful


nickmelis
2016-05-25 09:57
thanks @mcrafols that is really useful. Shame I don’t have enough reputation on StackOverflow

rabadiw
2016-05-25 13:17
has joined #fabric

ramesh
2016-05-25 16:08
@scottz:

scottz
2016-05-25 16:08
has joined #fabric

joseph
2016-05-26 02:26
If we run the asset management example, what should be the metadata that sent to the chaincode?

tedy
2016-05-26 05:05
has joined #fabric

yingfeng
2016-05-26 06:15
could I setup the network environment without varant and docker ? it seems when i start a peer node on machine A using : peer node start and start another peer node on machine BS using: export CORE_PEER_DISCOVERY_ROOTNODE = ip of machine A peer node start then i got error on machine B: panic: Error reading CORE_NOOPS plugin config: Unsupported Config Type "" do i need some extra procedure to start on bare metal without docker and deploy chaincodes?

joseph
2016-05-26 06:55
is it possible to read data from rocksdb locally?

joseph
2016-05-26 08:39
Can we run asset management example in dev mode? what is a right metadata for that example?

nickmelis
2016-05-26 09:30
what is listening on port 31315? I can’t find anything in the logs but I can see the port is in use by fabric

yingfeng
2016-05-26 11:18
how to deploy fabric to a production enviornment? It seems all the existing documents are sandbox or dev environment on single machine.

ghaskins
2016-05-26 11:41
@yingfeng: I would study the docker-compose files to see what they are setting for each VP

ghaskins
2016-05-26 11:42
@joseph: can you clarify what you mean by “locally"

ghaskins
2016-05-26 11:42
e.g. do you mean from within chaincode? or just from something colocated with the node that runs the vp

ghaskins
2016-05-26 11:43
for the former, no….for the latter, the db is stored in /var/hyperledger/production (by default)

ghaskins
2016-05-26 11:43
(though you would want to be aware of rocksdb-specific rules governing concurrent access

ghaskins
2016-05-26 11:44
i.e. you might only be able to safely open the database if the peer is not actively running

ghaskins
2016-05-26 11:46
@nickmelis: its helpful to grep peer/core.yaml to find that answer

ghaskins
2016-05-26 11:47
@yingfeng: support for production deployments is emerging, the project is too young to have this polished

yingfeng
2016-05-26 11:48
@ghaskins: could I run fabric on multiple physical nodes?

ghaskins
2016-05-26 11:52
of course

ghaskins
2016-05-26 11:52
its just a matter of setup

ghaskins
2016-05-26 11:53
the docker-compose stuff is effectively doing the same things, they are all isolated from one another in terms of filesystem/network/etc

ghaskins
2016-05-26 11:53
so, you could take hints from the docker-compose as to how its configuring the different nodes and replicate that on physical boxes

ghaskins
2016-05-26 11:53
you would just be on your own to actually orchestrate it

ghaskins
2016-05-26 12:04
alternatively, you could try to use docker-swarm to distribute the docker-compose based workload out to physical machines

ghaskins
2016-05-26 12:04
i’ve never tried this, but it should be theoretically possible

yingfeng
2016-05-26 12:05
here is my experiments using calico as docker SDN https://github.com/hyperledger/fabric/issues/1602, but i got wrong when deploying chaincodes

ghaskins
2016-05-26 12:07
i am not an expert in this regard by any stretch, but @corecode is correct, you need to ensure that the deployed peer image can reach the docker daemon since the peer uses docker to isolate chaincodes too

ghaskins
2016-05-26 12:07
seeing it use a unix channel is most certainly a bad configuration, the docker daemon will be running outside the peer container

ghaskins
2016-05-26 12:09

ghaskins
2016-05-26 12:10
so that the peer instance running in the container can break out of the container and find the relevant docker controller

ghaskins
2016-05-26 12:10
failing to set this will result in it looking for the daemon via UDS, which will not work

ghaskins
2016-05-26 12:11
i would scrutinize the docker-compose config, its already doing mostly what you need, you just need to port to your environment

joseph
2016-05-26 12:17
@ghaskins: I mean whether I can read directly data from /var/hyperledger/production/db using rocksdb client.

ghaskins
2016-05-26 12:18
i do not imagine you “can’t”, its not like we altered the rocksdb engine

ghaskins
2016-05-26 12:18
whether you can do so safely or in any meaningful way is an exercise for the reader :wink:

ghaskins
2016-05-26 12:20
i dont know rocksdb specifics, but I have worked with a ton of other dbs and most of them might not be happy with multiple concurrent access, so you might need to shut the peer down first

simon
2016-05-26 12:20
yea, i'd like to have a rocksdb cli as well

joseph
2016-05-26 12:21
@ghaskins: I got it.

simon
2016-05-26 12:21
joseph: or do you want to build an application on that?

joseph
2016-05-26 12:21
I want to examine how data ecrypted in rockdbs.

ghaskins
2016-05-26 12:22
@joseph: reading between the lines: are you trying to see how/if peer protects the rocksdb layer itself?

joseph
2016-05-26 12:22
yes.

ghaskins
2016-05-26 12:22
or are you interested in just seeing the raw ledger data

joseph
2016-05-26 12:23
both :slightly_smiling_face:

ghaskins
2016-05-26 12:23
ah, i see…i havent been involved in any of that impl, but I am reasonably certain you are not going to see much in the way of protecting the rocksdb layer

ghaskins
2016-05-26 12:23
note that this is perfectly ok in my mind

ghaskins
2016-05-26 12:23
the threat model is not local access at the peer level

ghaskins
2016-05-26 12:24
the peer environment is considered trusted by the peer, its the network of other actors that is not trusted

ghaskins
2016-05-26 12:24
but as such, the peer code doesnt try to obfuscate neither .text nor .data within the node

simon
2016-05-26 12:25
joseph: why do you want to read the database directly?

ghaskins
2016-05-26 12:26
therefore, it is perfectly acceptable to store data in the local filesystem generally unprotected, and I suspect we do exactly that….the only way to go deeper would be to use HW enclaves, etc

joseph
2016-05-26 12:26
@simon: someone ask me how much security of data on rocksdb does.

ghaskins
2016-05-26 12:26
but we dont do that today

simon
2016-05-26 12:26
joseph: what?

ghaskins
2016-05-26 12:26
the security is derived from the node itself, not the rocksdb layer

simon
2016-05-26 12:26
i don't understand that sentence

ghaskins
2016-05-26 12:27
@joseph: the node is a black box accessible via port 31315…all of the security is derived from that

joseph
2016-05-26 12:27
@simon: I mean that someone ask whether hacker reading directly data from rocksdb.

ghaskins
2016-05-26 12:27
(or whatever the grpc channel is, cant recall)

simon
2016-05-26 12:27
ah

yingfeng
2016-05-26 12:28
my mistake. After I set CORE_VM_ENDPOINT=http://172.17.0.1:2375, the chaincode deploy will not meet error outputs, but when I use restful apis as invoke/query, the peer will report (Error starting container: no such image), and i did not see chaincode images have been created

simon
2016-05-26 12:28
well, intruder having local access to the machine = pwnd

ghaskins
2016-05-26 12:28
@simon: well, hold on, not quite

joseph
2016-05-26 12:28
@ghaskins: your information is very useful. I should read it carefully.

ghaskins
2016-05-26 12:28
rocksdb does nothing to add security, yes

ghaskins
2016-05-26 12:29
but you arent necessarily completely pwnd…heh

simon
2016-05-26 12:29
joseph: all data of the local peer is accessible if you have access to rocksdb

ghaskins
2016-05-26 12:29
just pwnd w.r.t. info that the particular VP may have been privy too

simon
2016-05-26 12:29
yea

ghaskins
2016-05-26 12:29
if the VP was not in the endorser scope, that is still safe

ghaskins
2016-05-26 12:30
but I think we are in agreement

ghaskins
2016-05-26 12:30
@yingfeng: im guessing you do not have the basemage deployed perhaps

ghaskins
2016-05-26 12:31
@joseph @simon I think its safe to say generally that the security is derived at the network level (and this is ok, IMO)

yingfeng
2016-05-26 12:31
@ghaskins: only hyperledger-peer is not enough ?

ghaskins
2016-05-26 12:32
until we have an enclave like solution, anyway

joseph
2016-05-26 12:32
@ghaskins: I got it.

yingfeng
2016-05-26 12:32
this is the output of `docker images`: hyperledger-peer latest 0f28d42a3384 About an hour ago 1.963 GB

ghaskins
2016-05-26 12:33
you could try to further encrypt the db, but that is security theater without using a HW protection

ghaskins
2016-05-26 12:33
@yingfeng: yes, you need to have hyperledger/fabric-baseimage:latest on those nodes too

ghaskins
2016-05-26 12:33
note that this is a synthetic image that is generated by “make base-image"

ghaskins
2016-05-26 12:33
e.g. you wont find it on dockerhub

ghaskins
2016-05-26 12:34
the chaincode layer will base its isolation on that image

ghaskins
2016-05-26 12:34
i suspect that is what you are running into now

joseph
2016-05-26 12:36
@ghaskins: I'll try it. Thank you so much. I have a better understanding.

yingfeng
2016-05-26 12:38
@ghaskins: This is my current output of `docker images`: REPOSITORY TAG IMAGE ID CREATED SIZE hyperledger-peer latest 0f28d42a3384 About an hour ago 1.963 GB hyperledger/fabric-baseimage latest 1f49b23262c1 5 hours ago 1.297 GB hyperledger/fabric-baseimage x86_64-0.0.9 70328eed56aa 2 weeks ago 990 MB Still could not create chaincode image, yet~

ghaskins
2016-05-26 12:38
@yingfeng: you have that on all of your nodes?

ghaskins
2016-05-26 12:38
have to step out, will be back later

simon
2016-05-26 12:39
yingfeng: so what are the messages?

yingfeng
2016-05-26 12:39
yes, i have two nodes, and both hyperledger-peer and hyperledger/fabric-baseimage are imported from the development machine

simon
2016-05-26 12:40
what consensus protocol do you use?

yingfeng
2016-05-26 12:41
@simon the default config. These are outputs: {"jsonrpc":"2.0","result":{"status":"OK","message":"7b07c59e9b9405c1aef33493b63b9a766d9bb836989ded1730052de650aa8ce5654274d148ceff96a4e5bd43bca26aba099f55c400e4befdc8b2ee4c0a94e30b"} This is the response of rest api after deploying. 12:35:40.459 [rest] ProcessChaincode -> INFO 01c REST processing chaincode request... 12:35:40.460 [rest] processChaincodeDeploy -> INFO 01d REST deploying chaincode... 12:35:41.780 [container] WriteGopathSrc -> INFO 01e rootDirectory = /opt/gopath/src 12:36:25.883 [rest] processChaincodeDeploy -> INFO 01f Successfuly deployed chainCode: 7b07c59e9b9405c1aef33493b63b9a766d9bb836989ded1730052de650aa8ce5654274d148ceff96a4e5bd43bca26aba099f55c400e4befdc8b2ee4c0a94e30b 12:36:25.883 [rest] ProcessChaincode -> INFO 020 REST sucessfully deploy chaincode: {"jsonrpc":"2.0","result":{"status":"OK","message":"7b07c59e9b9405c1aef33493b63b9a766d9bb836989ded1730052de650aa8ce5654274d148ceff96a4e5bd43bca26aba099f55c400e4befdc8b2ee4c0a94e30b"},"id":1} These are outputs of peer node.

simon
2016-05-26 12:42
you will have to set the loglevel to DEBUG

simon
2016-05-26 12:42
so that you can see what is happening

yingfeng
2016-05-26 13:10
@simon: This is the log config: peer: debug crypto: info status: debug stop: warning login: warning vm: warning chaincode: debug Is it enough? It seems the log outputs have not change

simon
2016-05-26 13:21
i don't know

muralisr
2016-05-26 13:48
@yingfeng: try CORE_LOGGING_LEVEL=debug ./peer node start

simon
2016-05-26 13:57
muralisr: but why wouldn't the logging level work when configured from the config file?

joseph
2016-05-26 14:47
How to do an off-line registration to membership services?

arner
2016-05-26 19:10
@yingfeng the 'no such image' error may also mean that there's an error in your chaincode which caused it to fail to build.

bc
2016-05-26 21:47
has joined #fabric

yingfeng
2016-05-27 01:39

baohua
2016-05-27 01:42
there is some remaining issues to support overlay for hyperledger

baohua
2016-05-27 01:42

baohua
2016-05-27 01:45
@yingfeng:

yingfeng
2016-05-27 01:46
Hi, @baohua , I applied your patches actually but did no help~, it's just an extra configuration.

baohua
2016-05-27 01:47
actually, when u use overlay, you will meet this issues, but from your configuration, seems there’s also other problem. will reply u later.

yingfeng
2016-05-27 01:48
Actually, I created the dockernetwork with name of "net1", and when I use "net1" in the configuration `containerNetworkmode`, the chaincode container could not be even created.

yingfeng
2016-05-27 01:50
So the above outputs(in issue 1583, chaincode image was created, but query failed) still belong to the situation of `containerNetworkmode: host`

iamsamwood
2016-05-27 02:15
has joined #fabric

iamsamwood
2016-05-27 02:22
can someone please point me in the direction of some chain code examples? I looked at the chaincode_example02.go but I was wondering if there were others. Is it possible to hit an HTTP end point from a contract?

ghaskins
2016-05-27 02:34
did you see the others along side example02?


ghaskins
2016-05-27 02:34
as far as HTTP access, the short answer is “no"

ghaskins
2016-05-27 02:34
the long answer is, this will probably “work” if you try it today, as we are not locking down the container very much

ghaskins
2016-05-27 02:35
but a) this will change eventually, and b) its a really bad idea regardless w,r,t, deterministic responses from the chaincode

ghaskins
2016-05-27 02:36
rather, try to think about injecting whatever state/data to the contract, rather than the contract pulling the state/data in

iamsamwood
2016-05-27 02:42
@ghaskins makes sense, thank you!

iamsamwood
2016-05-27 02:44
i gather this state is public to anyone on the chain ?

ibmamnt
2016-05-27 05:54
How to login to peer network in development mode ? I used the configuration (e.g. <fabric-path>/bddtests/docker-compose-4-consensus-classic.yml ) to setup my development network in localhost, then try to login to each peer. I was able to login one of them, but others failed like: ```$ curl -X POST 172.17.0.5:5000/registrar --data '{"enrollId": "test_user0", "enrollSecret": "MS9qrN8hFjlE"}' {"OK": "Login successful for user 'test_user0'."} $ curl -X POST 172.17.0.6:5000/registrar --data '{"enrollId": "test_user0", "enrollSecret": "MS9qrN8hFjlE"}' {"Error": "rpc error: code = 2 desc = 'Identity or token does not match.'"} $ curl -X POST 172.17.0.3:5000/registrar --data '{"enrollId": "test_user0", "enrollSecret": "MS9qrN8hFjlE"}' {"Error": "rpc error: code = 2 desc = 'Identity or token does not match.'"} $ curl -X POST 172.17.0.4:5000/registrar --data '{"enrollId": "test_user0", "enrollSecret": "MS9qrN8hFjlE"}' {"Error": "rpc error: code = 2 desc = 'Identity or token does not match.'"}``` Is there anything I need to setup to use muliple peers ? I'm trying to setup 4 apps. Each try to access peers (e.g. vp0, vp1, vp2, vp3) in dependently.

ibmamnt
2016-05-27 07:35
I noticed with different user name, I can login to each peer. Maybe restriction in devnet setup.

yingfeng
2016-05-27 08:25
What's the possible reason why chaincode has not been registered after successfully creating ? For this issue https://github.com/hyperledger/fabric/issues/1602

nickmelis
2016-05-27 08:53
is there an easy way to include fabric-api in your Java project?

nickmelis
2016-05-27 08:54
I’m trying to get it up and running but finding a lot of problems

nickmelis
2016-05-27 08:55
it would be great to be able to use fabric-api rather than having to create another protobuf client

ibmamnt
2016-05-27 08:56
@yingfeng: Maybe, peer address is not passed to chaincode executable well. Mine is like this. ``` $ docker inspect <chaincode-container> "Cmd": [ "/opt/gopath/bin/6a5e8de94d239722c0529b6998969e3dd83e5e536035e6d1d6b093878d481f9f78c7502c295b0104ca7c69d7625ed3b6f6968a6fe469a5f1299e25dee9b5cfca", "-peer.address=172.17.0.3:30303" ], ```

nickmelis
2016-05-27 09:23
is anyone using and/or developing fabric-api atm?

yingfeng
2016-05-27 09:46
I pull the latest code with commit of "a11ce403cbad1f5cd90bd807de0c65eaf226f9a3", and rebuild the fabric image, then it could work! The previous image was built using code just 1 day before, I've not found relationship between several latest commits and the networking issue I reported..

garisingh
2016-05-27 10:56
@iamsamwood: we published a few samples here as well - https://github.com/ibm-blockchain (they are all Apache licensed so nothing proprietary)

garisingh
2016-05-27 11:03
@ibmamnt: the issue here is actually not a devnet restriction it is due to the way the APIs actually work and what they do. When you call the REST APIs to register / login users against a peer, the peer then basically acts as a client on your behalf (kind of like a wallet). So the peer itself actually calls all of the membersvcs APIs under the covers and essentially downloads all of the enrollment material locally. `enrollSecret` is basically a one time use token, so when you login to the first peer, that `enrollSecret` cannot be used again hence the failures and also the reason why you can use a different enrollID / enrollSecret against each peer and things work. There is a new NodeJS SDK which is coming out which will use the "native" API and have wallet like functionality. In that case, you'll be able to point the client at multiple peer using the same credentials. Hope this helps

yingfeng
2016-05-27 12:47
I setup a simple stress testing environment, and the single peer node even hangs under a relative higher pressure, and could not recover anymore. https://github.com/hyperledger/fabric/issues/1627

cesarev
2016-05-27 13:18
has joined #fabric

charles-cai
2016-05-27 13:30
has joined #fabric

ghaskins
2016-05-27 18:50
@ry: Requesting a new repo created under http://github.com/hyperledger called “fabric-test” with same maintainer ACLs as hyperledger/fabric, as per https://github.com/hyperledger/fabric/pull/1617

ghaskins
2016-05-27 18:51
see @cbf if further authorizations are required

ghaskins
2016-05-27 18:51
@arnaud: ^^^

arnaud
2016-05-27 18:54
thanks!

ry
2016-05-27 18:56
@ghaskins: https://github.com/hyperledger/fabric-test created with same acls as fabric

ghaskins
2016-05-27 18:57
@ry: thank you!

arnaud
2016-05-27 18:58
wow, that was quick! thank you

ry
2016-05-27 18:59
you’re welcome. if there are any issues let me know

ghaskins
2016-05-27 19:01
@arnaud: if you are willing, could you do a PR against the fabric-test that has your chaincode and perhaps a README explaining the repo (e.g. “Can be used to hold anything relevant to testing hyperledger/fabric that is for varying reasons inappropriate to host within hyperledger/fabric itself…"

ghaskins
2016-05-27 19:01
blah blah

arnaud
2016-05-27 19:01
sure

ry
2016-05-27 19:01
is there a pre-existing repo that’s almost there?

ghaskins
2016-05-27 19:01
ty

arnaud
2016-05-27 19:02
then I will update the PR against fabric to use that for the test

ghaskins
2016-05-27 19:02
@ry, it would be a directory copied from hyperledger/fabric, so not really a .git repo ready to go

arnaud
2016-05-27 19:02
right, it's just some chaincode example we need to reside in a different repo for testing purposes

ry
2016-05-27 19:03
@ghaskins: ok. I’ll let you guys handle it - I thought there was some other github repo I might be able to copy in toto

ghaskins
2016-05-27 19:03
unforunately, no…but fortunately the stuff that does need to go in is pretty straight forward

arnaud
2016-05-27 19:03
yeah, it's just a few files

arnaud
2016-05-27 19:04
well, it will be interesting to see what it takes actually :slightly_smiling_face:

ghaskins
2016-05-27 19:04
heh

ghaskins
2016-05-27 19:04
unless I am misunderstanding, i think it will be minimal…the imports that it declares will be stuff like …/shim and that is fine to draw from the other official repo IMO

arnaud
2016-05-27 19:05
agreed

sheehan
2016-05-27 19:05
I feel like the name of that repo is a bit confusing. I’d expect the tests to be in there, but they’re not

arnaud
2016-05-27 19:05
ah...

sheehan
2016-05-27 19:05
what’s the purpose?

ghaskins
2016-05-27 19:05
opps…sorry, i thought I let the PR comments stew long enough, sorry sheehan

arnaud
2016-05-27 19:06
storing the chaincode example we will use for testing

sheehan
2016-05-27 19:06
sorry, must have missed it

ghaskins
2016-05-27 19:06
should be trivial to change, though

ghaskins
2016-05-27 19:06
the PR referenced above has the context

sheehan
2016-05-27 19:06
maybe it all makes sense. I’ll read the PR


arnaud
2016-05-27 19:06
we could make it fabric-examples I suppose but unless we want to move all the examples there it's going to confuse people too

arnaud
2016-05-27 19:07
fabric-offshore ? :wink:

ghaskins
2016-05-27 19:07
heh

arnaud
2016-05-27 19:09
argh, I can't fork the new repo because it is empty

ry
2016-05-27 19:09
wait 1

ry
2016-05-27 19:10
go now

ghaskins
2016-05-27 19:11
opps…sorry @arnaud i should have thought of that

arnaud
2016-05-27 19:11
that will do, thanks!

ry
2016-05-27 19:12
let me redo that, perhaps

ry
2016-05-27 19:12
I see I pushed it from a different role account

arnaud
2016-05-27 19:13
bah, not sure it matters

ry
2016-05-27 19:13
and it may confuse code archeologists to see that the initial commit is from “alljoyn"

arnaud
2016-05-27 19:13
lol

arnaud
2016-05-27 19:13
I was wondering myself I have to say

arnaud
2016-05-27 19:13
but I don't know that it really matters

ry
2016-05-27 19:14
could you set up an empty repo in your account and let me just import your repo?

ry
2016-05-27 19:14
or similar

arnaud
2016-05-27 19:14
ah, ok

ry
2016-05-27 19:15
or I could clone fabric, since fabric-test is a subset of fabric, right?

arnaud
2016-05-27 19:15
yeah but it's going to bring in too much stuff

ry
2016-05-27 19:15
OK

arnaud
2016-05-27 19:16
I have to take a break for lunch but I can create a repo that you could import

ry
2016-05-27 19:16
arnaud: is there a directory in fabric I could jump to and copy over?

arnaud
2016-05-27 19:17
yes, hold on

arnaud
2016-05-27 19:17
fabric/examples/chaincode/go/chaincode_example01

ry
2016-05-27 19:17
ok, copy to same path or to root?

arnaud
2016-05-27 19:18
same path so it's easier to keep track of the origin

ry
2016-05-27 19:18
ok. enjoy some lunch :slightly_smiling_face:

arnaud
2016-05-27 19:18
we'll probably want to refresh it every now and then

arnaud
2016-05-27 19:18
thanks!

sheehan
2016-05-27 19:19
Is this really a unit test? As you’re contacting a running peer, I don’t think any of these tests contribute to the `go test -cover` result.

sheehan
2016-05-27 19:28
as for the name of the repo, “fabric-test-resources” or “fabric-test-assets” ? I also wouldn’t mind having a nice chaincode with it’s own repo, something a bit more flushed out than chaincode_example01. Like a “hello-chaincode” repo or something like that

ghaskins
2016-05-27 19:31
all sounds good to me

ghaskins
2016-05-27 19:32
I didn’t understand the comments you made about it possibly not being a unit test though

ghaskins
2016-05-27 19:32
IIUC, its invoking the deploy path with an http based path, which should increase coverage I would imagine

ghaskins
2016-05-27 19:33
(since to my knowledge we didnt have anything testing http based deploys)

ghaskins
2016-05-27 19:33
but maybe I am misunderstanding

ry
2016-05-27 19:40
OK. https://github.com/hyperledger/fabric-test is created with the initial content suggested.

ry
2016-05-27 19:40
if you want another repo name or something, just get @cbf to bless it and it’s easy enough to make happen

sheehan
2016-05-27 19:43
@ghaskins: oh, it’s possible I’m wrong. I believe at least some of these tests need a peer to be running. I thought the test was contacting that peer and that anything on the “server” side was not included in the test coverage

ghaskins
2016-05-27 19:44
thats a good question, i thought these tests executed in unit-test context and not against a peer

ghaskins
2016-05-27 19:44
but I might be wrong

kostas
2016-05-27 19:44
before I create an issue for this, who is the intended audience for the Travis CI README that's in the repo?

kostas
2016-05-27 19:45
it seems like the first three quarters of the document are addressed to the repo maintainers - why are the developers exposed to this info?

kostas
2016-05-27 19:46
I'd argue that the only relevant info to them is towards the end; the "How to skip Travis Build execution for PRs?" section (which probably belongs to either `CONTRIBUTING.md` or `docs/dev-setup/install.md`)

ry
2016-05-27 19:49
kostas: probably rename the whole travis ci readme? we’re working on getting jenkins up and running so it may soon be obviated regardless

arnaud
2016-05-27 19:56
@sheehan: that new test doesn't depend on a running peer, it's self contained

arnaud
2016-05-27 19:57
and it should increase coverage because it uses the getCodeFromHTTP function of hash.go which isn't tested at all otherwise

arnaud
2016-05-27 19:58
I do like your suggestions for the name of the repo

arnaud
2016-05-27 19:59
-resources sounds slightly better to me

arnaud
2016-05-27 19:59
for some reason

sheehan
2016-05-27 20:08
@arnaud: ah, ok. good to know it’s self contained

arnaud
2016-05-27 20:23
cool, this works

arnaud
2016-05-27 20:23
I changed my test to use the chaincode in the new repo and it passed

joe-alewine
2016-05-27 20:34
has joined #fabric

ry
2016-05-27 20:56
@arnaud: @sheehan @cbf if you want a new repo name for fabric-test please tell me in the next few hours

arnaud
2016-05-27 20:56
yes, fabric-test-resources would be better

ry
2016-05-27 20:56
I plan on hitting the road about 15:30 (PDT)

ry
2016-05-27 20:56
@cbf: do you approve?

arnaud
2016-05-27 20:56
and I just submitted a PR to expand on the readme

cbf
2016-05-27 20:58
ok by me


ghaskins
2016-05-27 21:10
nice all, thank you

ry
2016-05-27 21:10
fabric-test is gone. fabric-resources has the previous contents as well as the same ACLs

ry
2016-05-27 21:11
I merged the PR on -test which was a little presumptuous but it looked good to me

ghaskins
2016-05-27 21:21
not presumptuous at all, thank you @ry

ry
2016-05-27 21:23
you’re all very welcome.

cbf
2016-05-27 21:28
thx

arnaud
2016-05-27 21:46
oh, I thought we were going to call it fabric-test-resources

arnaud
2016-05-27 21:46
but that will work I guess

arnaud
2016-05-27 21:47
maybe making it more general is more future proof :slightly_smiling_face:

arnaud
2016-05-27 21:48
thank you @ry

ry
2016-05-27 21:50
this is the perfect time to make the change. Is that what you want? fabric-test-resources?

arnaud
2016-05-27 21:51
that's what I expected based on sheehan's suggestion (don't blame me ;-)

arnaud
2016-05-27 21:51
but let's see it we want to use it for anything more than test resources

arnaud
2016-05-27 21:52
@sheehan: what do you say?

sheehan
2016-05-27 21:53
I still say fabric-test-resources as we have tools which still live in the main fabric repo. Don’t want people to think they live in fabric-resources.

arnaud
2016-05-27 21:59
Ok, @ry if could, please. One last time.

arnaud
2016-05-27 22:07
for what it's worth my README already bears the title "Fabric Test Resources" :slightly_smiling_face:

ry
2016-05-27 22:18
sit still :slightly_smiling_face:

arnaud
2016-05-27 22:27
looks good! (yes, I had a peek ;-)

ry
2016-05-27 22:33
gentlepeople, I present fabric blah blah mark III: https://github.com/hyperledger/fabric-test-resources :slightly_smiling_face:

arnaud
2016-05-27 22:36
thank you, we're all set

arnaud
2016-05-27 22:37
@ghaskins, @sheehan, @muralisr: I updated PR #1617 to use the new repo

arnaud
2016-05-27 22:37
my local test seems to be running a lot faster

arnaud
2016-05-27 22:38
I suppose this is due to a much smaller repo to go get

arnaud
2016-05-27 22:39
but maybe it's just that at this time on a Friday the server and network have it easier :slightly_smiling_face:

sheehan
2016-05-27 22:40
thanks, I’ll let @ghaskins merge that one as he’s been more involved than I have

cbf
2016-05-27 22:42
have been thinking about release names

cbf
2016-05-27 22:42
it may be an early release we are shooting for, but numbers are lame

ry
2016-05-27 22:43
@cbf: my pushing for numeric, date-based names for releases over at AllSeen Alliance is a regret I carry to this day

cbf
2016-05-27 22:43
openstack has alphabetically ordered naming scheme where they select a name based on city of their semi-annual summits

cbf
2016-05-27 22:44
names are cool because memorable and also we can have contest for naming

ry
2016-05-27 22:44
look much better on swag, etc

cbf
2016-05-27 22:44
yeah

arnaud
2016-05-27 22:44
I don't care, my name is better than yours

arnaud
2016-05-27 22:45
:stuck_out_tongue:

arnaud
2016-05-27 22:46
more seriously, I like the city idea

ry
2016-05-27 22:47
it gives extra push to not have the summits in the same cities

arnaud
2016-05-27 22:47
indeed

cbf
2016-05-27 22:54
could name after famous blockheads

cbf
2016-05-27 22:55
lol

ry
2016-05-27 23:31
we run out of Peanuts characters pretty fast, though

cbf
2016-05-27 23:50
we could use astronomical names - sort of fits with “hyper"

cbf
2016-05-27 23:52
eg A could be Antares or Arcturus or we could base on zodiac


cbf
2016-05-27 23:52
brightest star in cancer which is the zodiac for the initial release

cbf
2016-05-27 23:55
Alpha Centuri, Aldebran

muralisr
2016-05-28 11:35
Love the astronomical name idea… its universal too

greg_not_so
2016-05-28 19:30
centauri?

cbf
2016-05-29 01:12
typo

joe-alewine
2016-05-29 20:55
The nodes of a blockchain network sort of reminds me of a star cluster. How about calling it Pleiades? If you want to go more subtle than that "Hyades" (High yah dees) is another star cluster that's visible to the naked eye but not as famous

ibmamnt
2016-05-30 00:51
@garisingh: Thanks for the detail explanation about peer login process. I'll use coming Node.js SDK if there is a need to login mulitple peers with the same enrollId

tedy
2016-05-30 04:29
HI All, can someone please help me understand how to migrate from development environment into prod mode? do we need to have vagrant as well ?

nits7sid
2016-05-30 05:15
Is it possible to modify the membersrvc.yaml to include my own affiliations_and_groups and register new users to those group?

frankdietrich
2016-05-30 06:12
has joined #fabric

jessie.yeung
2016-05-30 06:17
has joined #fabric

yingfeng
2016-05-30 09:07
https://github.com/hyperledger/fabric/issues/1627 There's a dead lock in the `core/chaincode/handler.go`

ibmamnt
2016-05-30 09:21
@nits7sid: FYI. I've just added auditor role user in membersrvc.yaml, and rebuild membersvc image. And it seems to work for me. peer command result: ```Login -> INFO 02e Registering client [auditor] with name [auditor]...done!``` RestAPI command result: ```[rest] Register -> INFO 036 Login successful for user 'auditor'.```

nits7sid
2016-05-30 09:47
can i do that programatically? like adding one more bank_d under banks groups.

nits7sid
2016-05-30 09:48
or do i have to add it manually inside memnersrvc.yaml?

greg_not_so
2016-05-30 12:29
@ibmamnt how is 'auditor' role different from 'endorser'? it reminds me a bit of 'miner', but not sore what the distinctions are

ibmamnt
2016-05-31 00:43
@greg_not_so: As far as I know, there are four role implemented in current fabric. > Chain Auditor - Entities with the permission to interrogate transactions. (Ref: https://github.com/hyperledger/fabric/blob/master/docs/glossary.md ) 'endorser' seems to do endorsement (typically found in linkedin - which assures like this person has this skills, I gurantee, something like this). So I think 'audit' and 'endorser' are quite different as far as I read the document.

ibmamnt
2016-05-31 00:43
@nits7sid: I did it manually, not done to add automatically via APIs yet.

zuowang
2016-05-31 02:51
has joined #fabric

slowtokyo
2016-05-31 10:44
has joined #fabric

binhn
2016-05-31 18:20
@ghaskins: @tamas @sheehan @cbf Discuss code “release" logistics: A- release branch or not — a branch would be more flexible and would allow updating the code with bug fixes, but it would require a merge with master B- prebuilt native exec files for download or docker images C- release webpage describing the code, capabilities, and any notes D- duration that community would support the release

binhn
2016-05-31 18:22
Alternative to release branch is to tag the master

ghaskins
2016-05-31 18:22
Re: A, I don’t think a release branch would be too bad to maintain

binhn
2016-05-31 18:23
ok

ghaskins
2016-05-31 18:23
B: as a slight riff, we could do os packaging (though I know that idea had some resistance in the past regarding deps, so perhaps similar sentiment would be directed at product

ghaskins
2016-05-31 18:24
one unknown with packaging would be how docker images are managed, though

ghaskins
2016-05-31 18:24
(today we download/build them as a product of the software build system, which is slightly different than how os packages tend to work

ry
2016-05-31 18:25
binhn: I much prefer release branches over tags, for point releases etc.

ghaskins
2016-05-31 18:25
id say of the tree: binaries, packages, or docker images, I would rule out the first

ghaskins
2016-05-31 18:26
C: sounds fine, though it could just be a releasenotes.txt too, whatever works best

ry
2016-05-31 18:26
also, on other projects I do something like git merge —no-ff origin/RB16.04 about once a day in a release cycle so master is never too far behind RB

ghaskins
2016-05-31 18:26
:anguished: i have no strong opinion on other than to say its probably too early/premature to commit to any kind of LTS

ghaskins
2016-05-31 18:27
That was supposed to be a D, but it got emoticoned, heh

binhn
2016-05-31 18:28
@ry: agreed on frequency of merge

ghaskins
2016-05-31 18:28
yeah, that sounds good to me too

ghaskins
2016-05-31 18:29
regarding B, it might be the most natural fit to target docker, at least for now

cbf
2016-05-31 18:29
suggest we use wiki for releases complete with release notes… as a log of all releases

ghaskins
2016-05-31 18:29
we would have to beef up a pipeline to push to dockerhub though, right now its very manual

binhn
2016-05-31 18:34
@cbf it would be the wiki of the branch, right? or on the fabric, we would create a page “releases” and have an entry for each release?

cbf
2016-05-31 18:35
no, wiki off the fabric repo

binhn
2016-05-31 18:35
@ghaskins: is that the pipe from CI (or Jenkin) build to dockerhub?

cbf
2016-05-31 18:35
so yes, wiki page called “releases” linked from top level page

binhn
2016-05-31 18:36
ok, got it

ghaskins
2016-05-31 18:39
@binhn: exactly

ghaskins
2016-05-31 18:39
ideally have some CI pipeline that can react in an intelligent way, build the assets and push them out

ghaskins
2016-05-31 18:39
e.g. perhaps in response to release tags

ghaskins
2016-05-31 18:40
right now, i have to do them all by hand…its not terrible because we only publish the base image and it changes infrequently, but that wont be the case if we decide to use docker more generally

binhn
2016-05-31 18:43
@cbf: do you know if our jenkins has a big pipe to dockerhub?

cbf
2016-05-31 18:43
ask @ry

binhn
2016-05-31 18:44
@ry: do you know if our jenkins has a big pipe to dockerhub?

ry
2016-05-31 18:51
binhn: define big pipe? if we’re publishing huge artifacts we (LF) usually will set up a Nexus server or similar locally

binhn
2016-05-31 18:54
enough to push a few gigabytes — an image is a little more than 1G and we need to push several

ry
2016-05-31 18:54
@binhn: Our jenkins is on a 10G interconnect from our cloud provider. How ofter will we be publishing these images?

ry
2016-05-31 18:55
@tykeal: ^^^

tykeal
2016-05-31 18:55
has joined #fabric

binhn
2016-05-31 18:55
only for the release and maybe its updates

binhn
2016-05-31 18:56
so not that often

binhn
2016-05-31 18:57
i think 10G should do; we can try and see

ry
2016-05-31 18:57
I suspect a Nexus system would be better. the Jenkins could publish to Nexus directly and then update dockerhub. are we going to be pulling from dockerhub on every build?

binhn
2016-05-31 18:58
no, the build caches the base images

tykeal
2016-05-31 18:59
your slaves are dynamic, they're going die off if they're idle long enough

ry
2016-05-31 18:59
where? our build machines will be relatively short lived.

binhn
2016-05-31 19:01
@bmos299: who is working the build on Jenkins?

bramwelt
2016-05-31 19:03
has joined #fabric

sheehan
2016-05-31 19:15
A: Yes, master branch is the latest. Branches for each release. B: Yes. Already link to some docker images in the wiki C: Agree with @cbf on wiki. Easier to maintain for now \D: Agree with @ghaskins. Too early for LTS

ramesh
2016-05-31 19:49
@binhn: I am working on Jenkins

binhn
2016-05-31 19:51
@ramesh: above ry and i exchanged about the network bandwidth needed for moving images back and forth dockerhub — could you chime in

ry
2016-05-31 19:52
I think we will need a cache of dockerhub at the very least

ramesh
2016-05-31 19:56
sure

cbf
2016-05-31 20:36
agree with @ghaskins this is NOT an LTS - it is if anything an alpha release

cbf
2016-05-31 20:36
we should think about naming vs numbering

cbf
2016-05-31 20:36
numbers tend to carry too much weight

ghaskins
2016-05-31 20:37
i liked the constellation ideas

cbf
2016-05-31 20:37
names are more memorable and creates opportunity to have naming contests etc

cbf
2016-05-31 20:37
:wink:

simon
2016-06-01 14:22
release branch is fine if you only anticipate minimal bug fixes

cbf
2016-06-01 14:59
well, I would expect that there would be LOTS of tests added and nothing but bug fixes to release

cbf
2016-06-01 14:59
s/expect/hope/

alexsani
2016-06-01 15:25
has joined #fabric

ghaskins
2016-06-01 17:01
@cbf: where is the template for authoring a new HIP ?

cbf
2016-06-01 17:01
wiki

ghaskins
2016-06-01 17:01

ghaskins
2016-06-01 17:01
maybe I am just missing it


ghaskins
2016-06-01 17:02
ty


ghaskins
2016-06-01 18:55
@cbf ^^^

cbf
2016-06-01 19:00
looks good please socialize here and on mailing list

ghaskins
2016-06-01 19:01
Will do, thanks

cbf
2016-06-01 19:01
I just canceled tomorrow’s TSC but we can take it up next week or via email

cbf
2016-06-01 19:01
thanks!

ghaskins
2016-06-01 19:02
Sounds good, I couldn't make it tomorrow anyway

ghaskins
2016-06-01 19:08
@bcbrock: I plagiarized part of the "Effort" section from your busywork proposal

ghaskins
2016-06-01 19:19
@cbf should the proposal go to the wiki prior to or after socialization?

cbf
2016-06-01 20:32
prior so people can find it

chenhua
2016-06-02 04:04
has joined #fabric

bcbrock
2016-06-02 06:00
@ghaskins I see that Greg Haskins has also had the out-of-the-body experience of referring to Greg Haskins in the 3rd person

ghaskins
2016-06-02 10:22
Heh


pmullaney
2016-06-02 19:58
has joined #fabric

ibmamnt
2016-06-03 01:16
Those who are executing fabric long running test under debug mode with Docker networking devnet setup, logs are piled up quickly. I'd like to share small code snippet to truncate logs. https://gist.githubusercontent.com/ibmamnt/c76d2ea4258aafa79c8ee7bf0411cc1b/raw/30589a62906297f2ddb116144c08fc608d442327/truncate-peer-logs.sh

ibmamnt
2016-06-03 01:17
```while true do echo "truncate container logs..." truncate -s 0 /var/lib/docker/containers/*/*-json.log echo "sleeping for 2 hours (60*60*2) seconds" sleep 7200 done```

yingfeng
2016-06-03 06:43
I have some questions on the consensus design: 1. If I setup two peer nodes as the initial fabric network, after some time, I wanted to add the third peer node into the fabric network, will the third peer node have the consistent state with existing two peer nodes? Since each peer is a replicant, the new peer node should synchronize data from existing peer nodes to keep the state consistency, however, I do not see such behavior, the new peer will return different query response with the existing one. 2. If I post `invoke` approaches to multiple peers concurrently, according to the consensus protocol, the eventual state of each node should be consistent, right? However, this is my test: I post stress `invoke` requests to `peer1` and `peer2`, then stop the requests. After some time(aim to wait for the nodes to reach consensus), I send query request to both peer nodes, but I've got different value. It seems replication state machine is not ready under current design.

kostas
2016-06-03 06:46
@yingfeng: #1 we don't support dynamically adding validators yet, this is coming a bit later on. #2 doesn't sound right though. which consensus plugin do you use?

yingfeng
2016-06-03 06:46
@kostas: I am using the default consensus plugin---`pbft`

yingfeng
2016-06-03 06:47
If I sent single invoke query to peer nodes, I can get consensus result. But my experiment is to perform the stress testing on multple peer nodes concurrently

kostas
2016-06-03 06:48
can you try this experiment with N=4 peers and report back?

yingfeng
2016-06-03 06:49
sure, do you mean I try it in N=2 and N=3 peers is not correct ?

kostas
2016-06-03 06:55
won't say that just yet; I want to reproduce this locally first (am traveling now, will have access to a laptop in ~12h)

yingfeng
2016-06-03 09:14
@kostas: I setup 4 peers, and perform stress `invoke` requests on two peers, after finished, then I send query request to each peer, and found each peer will return a different state

terryzk
2016-06-03 09:35
has joined #fabric

konradpabjan
2016-06-03 17:46
has joined #fabric

konradpabjan
2016-06-03 18:02
Is there any work being done to implement a db other than rocksdb at the moment? I came across this, https://github.com/hyperledger/fabric/issues/839, and though it would be useful for the sake of choice to make it easy to implement any type of db that a user would like. Abstracting the data interface would have to be done to get rid of some of the proprietary rocksdb code so that any db can work but would anyone object to this? Are we planning on just sticking with rocksdb in the long run?

greg_not_so
2016-06-03 19:08
i don't see a reason to limit the project to only one db, so if redis and others want in, why not let them?

agur
2016-06-04 00:56
has joined #fabric

babakkia
2016-06-05 12:56
has joined #fabric

pcen
2016-06-06 04:13
has joined #fabric

starsheriff
2016-06-06 05:16
has joined #fabric

novusopt
2016-06-06 12:23
Hi, I have one question where do you set the chaincode id in the code?

kostas
2016-06-06 13:00
the chaincode identifier is a hash that is returned to you upon deployment

kostas
2016-06-06 13:00
i.e. you don't set it, the system does

novusopt
2016-06-06 13:47
i set it and i get the same hash as i dont set it

kostas
2016-06-06 13:55
can you elaborate?

cbf
2016-06-06 14:05
: @binhn had a laptop malfunction and is unable to join the fabric maintainers call today. he suggests we cancel today's call

tamas
2016-06-06 14:05
I do not think missing him should cancel the call

simon
2016-06-06 14:06
not supported at the moment

simon
2016-06-06 14:06
woops

simon
2016-06-06 14:06
scrolled up

markparz
2016-06-06 14:06
anyone have an agenda?

tamas
2016-06-06 14:07
I have 3 pulls that i'd like to discuss

garisingh
2016-06-06 14:09
I am on - which request are we discussing now?

kostas
2016-06-06 14:11
generating TX IDs on the client

jonathanlevi
2016-06-06 14:18
@tamas, @garisingh, @kostas: while you are on the call (won't join the call): we have a bespoke Queue implementation https://github.com/hyperledger/fabric/blob/master/core/util/queue.go which is not used at all.

jonathanlevi
2016-06-06 14:19
Removed it last night, and everything builds successfully, etc. If there aren't any objections, I'd rather not have it on the main trunk...

kostas
2016-06-06 14:19
@jonathanlevi: is there a PR for this?

jonathanlevi
2016-06-06 14:20
It's under 1714, though I can cherry-pick (& create a separate PR for this quickly) if you want this in isolation.


ghaskins
2016-06-06 14:38
@tamas: @cbf I had sent Binh a PM this mornings that I couldn't make the call. In retrospect, should have posted here. Hopefully had quorum if the call still happened

tamas
2016-06-06 14:44
we are still talking. I thonnught you were in there

tamas
2016-06-06 14:44
*thought

ghaskins
2016-06-06 14:46
Ok, I'll be home momentarily but not listening yet

kostas
2016-06-06 14:48
@jonathanlevi: if it can be isolated, let's isolate it and create a PR - I'm all for removing stuff that's not used

jonathanlevi
2016-06-06 14:48
@kostas: Awesome. Will do, thank you.

ghaskins
2016-06-06 14:55
Just joined, but no one here except @jyellick. I assume the call ended?

ghaskins
2016-06-06 14:55
or am I in the wrong place

kostas
2016-06-06 14:55
@ghaskins: call ended

jyellick
2016-06-06 14:55
(And I forgot to close that window)

ghaskins
2016-06-06 14:55
@kostas: ah, thank you

ghaskins
2016-06-06 14:56
@cbf @tamas (or anyone) let me know if I have any action items

tamas
2016-06-06 14:59
I repurposed the call to talk about three pull request DA submitted.

tamas
2016-06-06 14:59
Hoping to get input of the community

tamas
2016-06-06 15:00
the Pulls are 1722 1719 and 1721

tamas
2016-06-06 15:00
There unanimous support for 1722

tamas
2016-06-06 15:01
people liked the idea of a noop system chain code.

ghaskins
2016-06-06 15:05
@tamas: I can’t recall what number it was, but the one about eliding failed TXs from the ledger seemed relevant to me

ghaskins
2016-06-06 15:05
but I havent had a chance to review it in depth

philippe
2016-06-06 15:26
has joined #fabric

tamas
2016-06-06 16:14
@ghaskins looking forward to your review of all three. They are all short and trivial in code.

arnaud
2016-06-06 16:54
I don't see why anyone would object to adding the noop

arnaud
2016-06-06 16:56
the other ones constitute a change in design that need to be agreed upon - not to say that I don't agree, they seem sensible to me but I'm not the expert here

lhaskins
2016-06-06 18:30
has joined #fabric

paulx
2016-06-07 05:01
i'm new to golang, so not sure where i am going wrong with the JSON format

novusopt
2016-06-07 07:12
Hi all i am facing a problem with the consensus algorithm

novusopt
2016-06-07 07:12
i have a docker network with four validator nodes

novusopt
2016-06-07 07:17
here is my dockerfile

novusopt
2016-06-07 07:17
docker-compose file

novusopt
2016-06-07 07:18
version: '2' services: vp0: image: hyperledger-peer command: peer node start" environment: CORE_PEER_ID: 'vp0' CORE_PEER_VALIDATOR_REPLICAS_IPS: 'vp0:30303 vp1:30303 vp2:30303 vp3:30303' CORE_SECURITY_ENROLLID: 'vp0' CORE_SECURITY_ENROLLSECRET: 'vp0' CORE_LOGGING_LEVEL: 'debug' CORE_PEER_ADDRESSAUTODETECT: 'true' CORE_PEER_VALIDATOR_CONSENSUS_PLUGIN: 'pbft' CORE_PBFT_GENERAL_N: '4' CORE_PBFT_GENERAL_MODE: 'classic' CORE_PBFT_GENERAL_TIMEOUT_REQUEST: '10s' CORE_SECURITY_ENABLED: 'true' CORE_VM_ENDPOINT: 'http://172.17.0.1:2375' vp1: image: hyperledger-peer command: "peer node start" environment: CORE_PEER_ID: 'vp1' CORE_PEER_VALIDATOR_REPLICAS_IPS: 'vp0:30303 vp1:30303 vp2:30303 vp3:30303' CORE_PEER_DISCOVERY_ROOTNODE: 'vp0:30303' CORE_SECURITY_ENROLLID: 'vp1' CORE_SECURITY_ENROLLSECRET: 'vp1' CORE_LOGGING_LEVEL: 'debug' CORE_PEER_ADDRESSAUTODETECT: 'true' CORE_PEER_VALIDATOR_CONSENSUS_PLUGIN: 'pbft' CORE_PBFT_GENERAL_N: '4' CORE_PBFT_GENERAL_MODE: 'classic' CORE_PBFT_GENERAL_TIMEOUT_REQUEST: '15s' CORE_SECURITY_ENABLED: 'true' CORE_VM_ENDPOINT: 'http://172.17.0.1:2375' vp2: image: hyperledger-peer command: "peer node start" environment: CORE_PEER_ID: 'vp2' CORE_PEER_VALIDATOR_REPLICAS_IPS: 'vp0:30303 vp1:30303 vp2:30303 vp3:30303' CORE_PEER_DISCOVERY_ROOTNODE: 'vp0:30303' CORE_SECURITY_ENROLLID: 'vp2' CORE_SECURITY_ENROLLSECRET: 'vp2' CORE_LOGGING_LEVEL: 'debug' CORE_PEER_ADDRESSAUTODETECT: 'true' CORE_PEER_VALIDATOR_CONSENSUS_PLUGIN: 'pbft' CORE_PBFT_GENERAL_N: '4' CORE_PBFT_GENERAL_MODE: 'classic' CORE_PBFT_GENERAL_TIMEOUT_REQUEST: '15s' CORE_SECURITY_ENABLED: 'true' CORE_VM_ENDPOINT: 'http://172.17.0.1:2375' vp3: image: hyperledger-peer command: "peer node start" environment: CORE_PEER_ID: 'vp3' CORE_PEER_VALIDATOR_REPLICAS_IPS: 'vp0:30303 vp1:30303 vp2:30303 vp3:30303' CORE_PEER_DISCOVERY_ROOTNODE: 'vp0:30303' CORE_SECURITY_ENROLLID: 'vp3' CORE_SECURITY_ENROLLSECRET: 'vp3' CORE_LOGGING_LEVEL: 'debug' CORE_PEER_ADDRESSAUTODETECT: 'true' CORE_PEER_VALIDATOR_CONSENSUS_PLUGIN: 'pbft' CORE_PBFT_GENERAL_N: '4' CORE_PBFT_GENERAL_MODE: 'classic' CORE_PBFT_GENERAL_TIMEOUT_REQUEST: '15s' CORE_SECURITY_ENABLED: 'true' CORE_VM_ENDPOINT: 'http://172.1

novusopt
2016-06-07 07:18
and i get following error

novusopt
2016-06-07 07:20
| 07:12:42.051 [crypto] Deploy -> INFO 06a Initializing client [client]...done! | 07:12:42.051 [devops] Deploy -> INFO 06b Creating secure transaction 1edd7021ab71b766f4928a9ef91182c018dffb86fef7a4b5a5516ac590a87957e21a62d939df817f5105f524abddcddfc7b1a60d780f02d8235bd7af9db81b66 | 07:12:42.162 [devops] Deploy -> DEBU 06c Sending deploy transaction (1edd7021ab71b766f4928a9ef91182c018dffb86fef7a4b5a5516ac590a87957e21a62d939df817f5105f524abddcddfc7b1a60d780f02d8235bd7af9db81b66) to validator | 07:12:42.165 [peer] SendTransactionsToPeer -> DEBU 06d Sending TX to Peer: vp0:30303 | 07:12:42.279 [peer] ProcessTransaction -> DEBU 09e ProcessTransaction processing transaction uuid = 1edd7021ab71b766f4928a9ef91182c018dffb86fef7a4b5a5516ac590a87957e21a62d939df817f5105f524abddcddfc7b1a60d780f02d8235bd7af9db81b66 | 07:12:42.279 [peer] ProcessTransaction -> DEBU 09f Verifying transaction signature 1edd7021ab71b766f4928a9ef91182c018dffb86fef7a4b5a5516ac590a87957e21a62d939df817f5105f524abddcddfc7b1a60d780f02d8235bd7af9db81b66 | 07:12:42.385 [peer] sendTransactionsToLocalEngine -> DEBU 0a0 Marshalling transaction CHAINCODE_DEPLOY to send to local engine | 07:12:42.391 [peer] sendTransactionsToLocalEngine -> DEBU 0a1 Sending message CHAIN_TRANSACTION with timestamp seconds:1465283562 nanos:391877511 to local engine | 07:12:42.392 [consensus/obcpbft] RecvMsg -> INFO 0a2 New consensus request received | 07:12:42.398 [peer] SendMessage -> DEBU 0a3 Sending message to stream of type: CONSENSUS | 07:12:42.399 [peer] SendMessage -> DEBU 0a5 Sending message to stream of type: CONSENSUS | 07:12:42.398 [peer] SendMessage -> DEBU 0a4 Sending message to stream of type: CONSENSUS | 07:12:42.400 [peer] SendMessage -> DEBU 0a6 Sending message to stream of type: CONSENSUS | 07:12:43.068 [peer] func1 -> DEBU 0a7 Sending 20627244 bytes to 172.18.0.21:30303 took 668.563215ms | panic: Cannot map sender's PeerID to a valid replica ID | | goroutine 66 [running]: | panic(0xbe1700, 0xc820229800) | /opt/go/src/runtime/panic.go:464 +0x3e6 | http://github.com/hyperledger/fabric/consensus/obcpbft.(*obcClassic).RecvMsg(0xc820250f00, 0xc8204d4180, 0xc820228bc0, 0x0, 0x0) | /opt/gopath/src/github.com/hyperledger/fabric/consensus/obcpbft/obc-classic.go:79 +0x518 | http://github.com/hyperledger/fabric/consensus/helper.GetEngine.func1.1() | /opt/gopath/src/github.com/hyperledger/fabric/consensus/helper/engine.go:124 +0xd8 | created by http://github.com/hyperledger/fabric/consensus/helper.GetEngine.func1 | /opt/gopath/src/github.com/hyperledger/fabric/consensus/helper/engine.go:126 +0x2bc | 2016/06/07 07:12:43 transport: http2Client.notifyError got notified that the client transport was broken EOF.

novusopt
2016-06-07 07:27
i found the error

tamas
2016-06-07 07:58
@ghaskins @binh @arnaud if there is no objection to noop chaincode then please merge as i should not merge my own PR.

tamas
2016-06-07 07:58
@binhn ^


ghaskins
2016-06-07 11:14
@tamas: I reviewed it yesterday and IIRC it LGTM. I'll merge it shortly when back at my desk

ghaskins
2016-06-07 11:26
@tamas: the CI run had failed due to a timeout, so I just restarted it to make sure everything is fine

ghaskins
2016-06-07 11:27
(I dont think it was related to your patch)

kai.weller
2016-06-07 12:44
has joined #fabric

cbruguera
2016-06-07 13:12
has joined #fabric

cbruguera
2016-06-07 13:12
Hello guys!

cbruguera
2016-06-07 13:12
I have a question... I'm quite a blockchain newbie, but I'm researching into different technologies since I am building a platform for management of identities and KYC. I was told that IBM OBC was a good choice for us, and I'm barely at the beginning of my research... Is IBM OBC somehow "deprecated" now? Is HyperLedger fabric the thing I should be looking for?

simon
2016-06-07 13:14
obc was donated as hyperledger fabric

simon
2016-06-07 13:14
so that's the thing to look at

cbruguera
2016-06-07 13:14
Thank you very much

cbruguera
2016-06-07 13:15
I'll probably be asking some more questions later, since I'll be getting started with fabric soon.

ghaskins
2016-06-07 13:38
@dianfu: here

dianfu
2016-06-07 13:38
has joined #fabric

ghaskins
2016-06-07 13:38
@dianfu: regarding status, I don’t know. I am just the feature requester :wink:

dianfu
2016-06-07 13:43
ok. thanks a lot.:grinning: Is there any other way to identity a user's identity in chaincode?

dianfu
2016-06-07 13:45
with tcert, seems that it's difficult to do so.

ghaskins
2016-06-07 13:53
to be clear, that is the point :wink:

ghaskins
2016-06-07 13:53
if the user identity isn’t important to mask, you can always opt to have the ECERT id included

ghaskins
2016-06-07 13:54
i think support in general for any of this is still emerging however

ghaskins
2016-06-07 13:55
what I was asking for was something in the middle…stable id for the purposes of chaincode function, but obfuscated true-identity from the perspective of unprivileged entities

nickmelis
2016-06-07 14:01
I’m using fabric via JSON api and trying to experiment with permissioned blockchain

nickmelis
2016-06-07 14:02
the first option is to pass a “securecontext” username

nickmelis
2016-06-07 14:02
and it has to be configured in membersrvc.yaml if I’m not mistaken

nickmelis
2016-06-07 14:03
with the registrar API I can login and get tcert and ecert, but how can I use those certificates when invoking/querying chaincode?

ghaskins
2016-06-07 14:05
nickmelis: the only way I know how to right now is via the SDK

ghaskins
2016-06-07 14:05
./sdk/node

ghaskins
2016-06-07 14:05
though im sure the protocol could be emulated if you really wanted to

nickmelis
2016-06-07 14:06
but there’s no option to use it via JSON API right now, correct?

dianfu
2016-06-07 14:08
The rest api in peer node currently use TCert to construct the transaction. If I want to use ECert, I have to construct the transaction by myself. Is my understanding correct?

dianfu
2016-06-07 14:11
seems that there is no switch to let user choose whether to use ECert or TCert in the rest API.

ghaskins
2016-06-07 14:11
@nickmelis: not sure, you could look at how the SDK does it I suppose

ghaskins
2016-06-07 14:11
@dianfu: my understanding is that ecerts can not be used directly in a txn

ghaskins
2016-06-07 14:12
IOW, you always use a tcert, with varying level of detail exposed between the ecert/tcert

nickmelis
2016-06-07 14:15
@dianfu: is there a way to pass the TCert in the JSON request through the API rather than the “securecontext” ?

nickmelis
2016-06-07 14:17

binhn
2016-06-07 14:17
@nickmelis: JSON RPC API doesn’t allow passing TCert, but it automatically selects a TCert for the transaction. You should look at the client SDK, which has more flexibility

nickmelis
2016-06-07 14:18
ok so all the users are in the yaml file, right?

nickmelis
2016-06-07 14:18
based on that, the sdk creates and sends ECert/TCerts

binhn
2016-06-07 14:19
there’re Membership Services API to add users, but the easiest way to test is to stick the users into the yaml file

nickmelis
2016-06-07 14:19
@binhn: when you say Membership API are you talking about the /registrar API?

binhn
2016-06-07 14:20
no, it’s gRPC api; let me find the doc

nickmelis
2016-06-07 14:20
ah right


nickmelis
2016-06-07 14:21
so I would need a gRPC client right?

binhn
2016-06-07 14:21
the client SDK (javascript) provides that

binhn
2016-06-07 14:21
or you can use other languages that support gRPC

nickmelis
2016-06-07 14:22
is there any Java gRPC client out there?

nickmelis
2016-06-07 14:22
or should I build my own one?

nickmelis
2016-06-07 14:23
I think fabric-api was an attempt towards that direction, but I’ve never managed to get it up and running

binhn
2016-06-07 14:23
you can build your own or look at the Java Fabric project to contribute

nickmelis
2016-06-07 14:23
who’s developing the fabric-api project atm?

binhn
2016-06-07 14:24
mainly @tamas

nickmelis
2016-06-07 14:27
ok thanks. It would be interesting to know if there is a roadmap and what developments are planned for fabric-api

nickmelis
2016-06-07 14:28
and also how the other guys here use fabric-api. I would like to just import it as an external library into my Java project

dianfu
2016-06-07 14:31
@ghaskins: Thanks very much. So your feature request about a certificate between ECert and TCert is very useful. Without it, it's very difficult to identity a user's identity and so it would be unable to do access control in chaincode.

binhn
2016-06-07 14:51
@dianfu: you might want to take a look at this doc https://github.com/hyperledger/fabric/wiki/Attribute-Certificate-Authority

dianfu
2016-06-07 15:17
@binhn: Thanks a lot for your sharing. An interesting feature. While it seems that it's still in discussion or in development? I cannot find any code related.

mpage
2016-06-07 17:31
has joined #fabric

nkunkel
2016-06-07 17:54
has joined #fabric

randy
2016-06-07 19:09
has joined #fabric

zuowang
2016-06-08 01:17
@zuowang uploaded a file: https://hyperledgerproject.slack.com/files/zuowang/F1EVA0Q7N/stderr and commented: mem:8g

zuowang
2016-06-08 01:19
I got out of memory error when ran performance test with busywork. I got the same error even when I increased my vagrant memory to 8G. Can anyone help to take a look? Thanks very much!

grapebaba
2016-06-08 02:24
@binhn: @nickmelis i feel current document not enough detail for creating a grpc client with other language, if someone could describe all the specific interfaces, we can implement it easier

jay_guo
2016-06-08 03:59
has joined #fabric

norbs
2016-06-08 05:06
has joined #fabric

shubhamvrkr
2016-06-08 05:49
What is the upper limit for how much data can be stored in a chaincode’s state and is it all managed in peer's memory ?

nkunkel
2016-06-08 06:13
During chaincode deployment I keep running into the error: [chaincode] chaincodeSupport -> DEBU -2d handler not found for chaincode /home/ibm/loyaltyBank.go:0.0.1 Does this mean fabric can't find my chaincode source file? Does the path supplied for the -p argument during chaincode deployment not use absolute paths?


nickmelis
2016-06-08 09:36
when I POST to the /registrar API, does the user I am using have to be configured in membersrvc.yaml first?

gengjh
2016-06-08 09:38
currently, the answer is yes I think. As I know there is plan to manage the users via system cc.

nickmelis
2016-06-08 09:40
someone was talking about the ability to add users via API, but I think it’s only viable via gRPC at the moment

gengjh
2016-06-08 09:40
yes. only gRPC for now

nickmelis
2016-06-08 09:41
I see…thanks for the info

gengjh
2016-06-08 09:41
yw

nickmelis
2016-06-08 10:20
if I configure an user as an auditor in membersrvc.yaml, should I be able to invoke a contract?

nickmelis
2016-06-08 10:20
I’d say no, but nothing is stopping me from doing it...

nhrishi
2016-06-08 11:17
has joined #fabric

shrein
2016-06-08 11:42
has joined #fabric

ikruiper
2016-06-08 12:26
has joined #fabric

crow15
2016-06-08 16:20
has joined #fabric

nkunkel
2016-06-08 18:00
@mcrafols: Hmm, so according to that I should be able to use absolute paths if I'm starting my nodes manually using ./obc-peer, so not quite sure why it's not working. Can you confirm if the handler error I'm getting refers to being unable to find the chaincode at the path specified?

nkunkel
2016-06-08 21:20
Never mind, figured it out.

baqer
2016-06-09 05:53
has joined #fabric

mcrafols
2016-06-09 07:51
@nkunkel: what was the problem?

fjk
2016-06-09 09:34
has joined #fabric

ibmamnt
2016-06-09 09:38
Hi, is there any script to calculate currentBlockHash value of specific block ? I'm aware <rest-url>/chain will produce currentBlockHash and previousBlockHash. But /chain/blocks/{block} will not print out blockhash itself. Say, if the height is 100, I'd want to calculate Blockhash of block '98 ' to verify previousBlockHash value of latest block ('99') is valid.

simon
2016-06-09 09:44
ibmamnt: i think the REST interface should return the hash itself

pschnap
2016-06-09 14:06
has joined #fabric

pschnap
2016-06-09 14:09
Morning all; I've created a Go module to help out with the boilerplate involved in parsing arguments that are passed in to chaincode from REST calls: you register a function (with a standard typed parameter list) and the module parses all the arguments from `args []string` into built-in types, or unmarshals them from JSON, and calls the function with them. Is there any interest in this? Where can I submit this? Sorry if this isn't the right channel to ask in.

ghaskins
2016-06-09 15:10
@pschnap: I’ve been working on something similar (https://github.com/ghaskins/chaintool). Perhaps we can collaborate

ghaskins
2016-06-09 15:11
mine works with dynamic code generation rather than a module, though

pschnap
2016-06-09 15:52
@ghaskins: interesting looking project! (Surprised me to find it's written in Clojure!) My module seems like it would fit in the back-end for Go implementations generated by your code -- whether it should be part of your project or part of the hyperledger itself is difficult to say, thought it seems like it might fit better in the hyperledger project directly. As for collaboration, this was just something that I wrote while I had some down-time between project tasks and I don't know what I'll be tasked with next -- hyperledger isn't my primary project.

ghaskins
2016-06-09 15:53
@pschnap: note that I have made a recent proposal to include chaintool in the hyperledger code base…i think it will be reviewed at next weeks TSC call


ghaskins
2016-06-09 15:55
so, FWIW, if the only reservation is that its currently out of the tree, that _may_ change in the near future

nkunkel
2016-06-09 16:46
@mcrafols I had forgotten to set the OPENCHAIN_CHAINCODE_ID_VERSION and OPENCHAIN_PEER_ADDRESS parameters. I'm still not 100% sure how the peer address works, but I believe it routes the calls to the chaincode's "symbolic" urls to the peers with the "physical" paths of the chaincode. For some reason directly giving the absolute physical paths directly in the chaincode url does not work.

mcrafols
2016-06-09 16:47
I think the path is relative to $GOPATH/src

mcrafols
2016-06-09 16:50
@nkunkel: are you using openchain?

nkunkel
2016-06-09 16:50
Yes

nkunkel
2016-06-09 16:51
It's an openchain project I inherited and trying to get it to work with fabric has broken too much stuff to make it worth it.

nkunkel
2016-06-09 16:53
I'm aware the path was relative to $GOPATH/src, I stored my chaincode relative it but still no dice. May have been a bug with the version of openchain I'm using.

cbf
2016-06-09 17:36
@nkunkel: openchain has been deprecated for a while… you may want to fork/clone the hyperledger/fabric repo and build a new environment https://github.com/hyperledger/fabric/blob/master/docs/dev-setup/install.md

nkunkel
2016-06-09 17:40
In the future I will, but for now I'm stuck with this and a looming deadline =/

markparz
2016-06-09 20:51
@nkunkel: Can you give us more information on the deadline? We would like to clean out that repo to make sure nobody else uses that extremely old code, but don’t want to pull the rug out from under you

nkunkel
2016-06-09 20:53
Could someone help me diagnose an error. I'm sending a GET request from a node.js client to Openchain. Get the following error back: STATUS: 404 HEADERS: {"access-control-allow-headers":"accept, content-type","access-control-allow-origin":"*","content-type":"application/json","date":"Thu, 09 Jun 2016 20:41:41 GMT","content-length":"42","connection":"close"} DATA: {"Error": "Openchain endpoint not found."} Any ideas? Seeing as this is an Openchain supplied error, that means we're connecting to the chaincode server correctly, but we're not able to identify the specific chaincode I'm trying to query? Or could it identify the correct chaincode, but could not find the specific function within it I'm trying to query?

nkunkel
2016-06-09 20:55
It's a demo for LinuxCon. I think the sales guys might want to use it for client demos at some point, but I think we'll just have them connect to my current machine and won't need to provision new ones.

nkunkel
2016-06-09 20:55
@markparz:

markparz
2016-06-09 20:58
ok, thanks @nkunkel


cbf
2016-06-09 21:54
danke

arnaud
2016-06-09 21:54
thanks for the heads-up

muralisr
2016-06-09 23:41
@nkunkel: seems to mean the call does not map to any defined REST endpoint.

nkunkel
2016-06-09 23:42
Whats odd though is that if I try to do an invoke instead of a query it finds the endpoint just f ine

nkunkel
2016-06-09 23:42
it's just the query function that is giving me the error.

muralisr
2016-06-09 23:44
can you try the query as a POST

nkunkel
2016-06-09 23:58
all of my init, invoke, and query are done through post

nkunkel
2016-06-09 23:58
should the query be a GET?

nkunkel
2016-06-10 00:01
trying it now, let's see if this works

nkunkel
2016-06-10 00:03
nope, made no difference

cbf
2016-06-10 00:06
no, it is a post as well

nits7sid
2016-06-10 06:32
Hi started 4 peers and 1 CA using the doc https://github.com/hyperledger/fabric/blob/master/docs/dev-setup/devnet-setup.md I get warning on differnt peers "Received duplicate connection from <nil>, switching to new connection" and Error "06:04:29.680 [peer] handleChat -> ERRO 022 Error handling message: Peer FSM failed while handling message (DISC_HELLO): current state: created, error: transition canceled with error: Error registering Handler: Duplicate Handler error: {name:"vp2" 172.17.0.4:30303 VALIDATOR }" ..

harsha544
2016-06-10 07:56
has joined #fabric

garisingh
2016-06-10 10:54
@nits7sid: can you post the command lines you use to start each peer? Do you possibly have a duplicate name in one of them in the `CORE_PEER_ID` you are passing in?

mrshah
2016-06-10 12:37
AFAIK - Duplicate Handler Error can be ignored. This might happen due to grid networking & discovery. The peer might be dialing again to the same peer when it discovers it through multiple peers

bcbrock
2016-06-10 13:56
IMHO a comprehensive test suite should fail any test that generates ERROR messages in its logs (unless it was an error injection test). Issue #685 has been open for 4 months on the issue that @nits7sid mentioned and marked as a bug.

bcbrock
2016-06-10 13:58
Any of us could submit a PR to downgrade the message severity, but it would be better I think for someone familiar with the protocol to make sure this is really benign.

grapebaba
2016-06-10 14:36
does it already have some metrics for fabric?

nits7sid
2016-06-10 15:36
@garisingh: docker run --rm -it -p 5001:5000 -e CORE_VM_ENDPOINT=http://172.17.0.1:2375 -e CORE_PEER_ID=vp0 -e CORE_PEER_ADDRESSAUTODETECT=true -e CORE_SECURITY_ENABLED=true -e CORE_SECURITY_PRIVACY=true -e CORE_PEER_PKI_ECA_PADDR=172.17.0.1:50051 -e CORE_PEER_PKI_TCA_PADDR=172.17.0.1:50051 -e CORE_PEER_PKI_TLSCA_PADDR=172.17.0.1:50051 -e CORE_SECURITY_ENROLLID=test_vp0 -e CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT hyperledger/fabric-peer peer node start

nits7sid
2016-06-10 15:37
@garisingh: all the peer id's are different

garisingh
2016-06-10 17:22
@nits7sid: are things actually working and you are just seeing these messages in the log or is the network not accepting transactions?

gabelev
2016-06-10 19:04
has joined #fabric

sbrakev
2016-06-10 21:04
has joined #fabric

nits7sid
2016-06-11 08:08
@garisingh: the network is not accepting transactions.. when i deploy a chaincode it returns me the hash but the chain height does not get increased.

iamsamwood
2016-06-11 21:00
i'm going through the asset_manager chain code example and was wondering how users attach their certificate as metadata to Init

iamsamwood
2016-06-11 21:02
specifically "[asset_mgm] DEBU : Invalid admin certificate. Empty."

garisingh
2016-06-11 21:17
@iamsamwood: how are you trying to run this? via the REST API or the peer cli?

garisingh
2016-06-11 21:18
unfortunately, I don't think you can do it either of those ways. You'll want to check out https://github.com/hyperledger/fabric/tree/master/examples/chaincode/go/asset_management/app which uses a native Go client to deploy and invoke the chaincode

garisingh
2016-06-11 21:19
once the new NodeJS SDK is done, you should be able to do this via a NodeJS app though

iamsamwood
2016-06-11 21:24
@garsingh i was trying both, but didn't try the SDK thank you!

garisingh
2016-06-11 21:25

garisingh
2016-06-11 21:26
you'll see in app_internal.go a deployInternal function which sets the metadata for the deploy transaction

iamsamwood
2016-06-11 21:26
okay great

iamsamwood
2016-06-11 21:26
i assume the dev VM has all the deps i need to run this?

garisingh
2016-06-11 21:32
yeah - since we can run it during builds

iamsamwood
2016-06-11 22:05
@garisingh: it looks like the docs are out of date, they refer to https://github.com/hyperledger/fabric/blob/master/consensus/docker-compose-files/compose-consensus-4.md which is gone--are there still docker-compose files for launching a small network

iamsamwood
2016-06-11 22:28
i used the chain code dev network but the query portion of the asset manager app fails (it *does* successfully deploy and assign ownership): "Resp [status:FAILURE msg:"Error:Failed to launch chaincode spec(Failed to init chaincode(handler not found for chaincode b4…))” ]"

cbf
2016-06-12 13:59
@iamsamwood: yes under the bddtests folder

sachikoy
2016-06-13 03:47
has joined #fabric

sachikoy
2016-06-13 03:50
Question. How an auditor can trace a TCert back to the ECert or the enrollment ID? The membership service API does not seem to include such a function. https://github.com/hyperledger/fabric/blob/master/docs/API/MemberServicesAPI.md

ravids
2016-06-13 05:52
has joined #fabric

kpatch
2016-06-13 06:37
has joined #fabric

pkulkark
2016-06-13 10:58
has joined #fabric

arnaud
2016-06-13 14:31
@binhn: sorry I was on mute and didn't manage to unmute on time but I wanted to ask how/where we will coordinate the release work, are we going to create a new channel, use fabric-dev, or what?

cbf
2016-06-13 15:56
@arnaud: @binhn I would think that fabric-dev should suffice, no?

ghaskins
2016-06-13 16:00
my opinion, fewer channels better until it becomes apparent that a particular subtopic is dominating and drowning out less active conversations

bramwelt
2016-06-13 16:11
Jenkins lost it's connection to Github over the weekend. Working on getting backlogs jobs triggered (and ran on one-shot build servers). Sorry for the 'reverify jenkins' noise on PRs!

arnaud
2016-06-13 16:25
@ghaskins: I was actually thinking the opposite: that it might be helpful to have a dedicated channel so that the info doesn't get drown out or simply mixed in with other conversations, but I don't feel strongly about this so I'm ok with using fabric-dev @cbf

ghaskins
2016-06-13 16:26
yeah, i guess its a function of how much chatter is generated

ghaskins
2016-06-13 16:26
i dont have a strong opinion either

ghaskins
2016-06-13 16:26
(I do know I have too many channels to monitor lately, though ;)

cbf
2016-06-13 16:27
+1 on too many channels

sheehan
2016-06-13 16:31
@bramwelt: is there somewhere I can see the backlog? I’m waiting for Jenkins to run on https://github.com/hyperledger/fabric/pull/1683 but I’m not sure where it is in the queue


bramwelt
2016-06-13 16:32
I'm trying to figure out why Jenkins things multiple PRs should be lumped together...

sheehan
2016-06-13 16:34
ah, thanks. Yeah, was only looking at the description with 1802

sheehan
2016-06-13 17:11
@bramwelt: https://jenkins.hyperledger.org/job/fabric-github-verify-x86_64/166/ Seems like jenkins reports success, but GitHub still says pending in the PR https://github.com/hyperledger/fabric/pull/1683

bramwelt
2016-06-13 17:12
@sheehan: I saw :disappointed: Looks like the lumping PRs together is the issue. It only reported back on #1801

sheehan
2016-06-13 17:12
for now I’ll just watch jenkins and merge when I see success there

ramesh
2016-06-13 17:30
I observed this, when PR requests are in queue but Jenkins node is booting up to accept the requests.. Once it is up, all the pending requests are pushing into a single build

ibmamnt
2016-06-14 07:12
Does anybody have worked on to compile .proto files in fabric into python ? I did some initial test like: ```protoc --python_out=/tmp/python --proto_path=/usr/include -I=. fabric.proto``` And create a small python program, but failed like: ```$ python test.py Traceback (most recent call last): File "test.py", line 2, in <module> import fabric_pb2 File "/home/amnt/tmp/fabric_pb2.py", line 16, in <module> import chaincode_pb2 as chaincode__pb2 File "/home/amnt/tmp/chaincode_pb2.py", line 17, in <module> from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 ImportError: cannot import name timestamp_pb2``` The purpose is to add dump feature for restapis (e.g. /transactions/{txuuid}) result. e.g. "payload". Dump to something like: ``` transaction = transaction = fabric_pb2.Transaction() transaction.payload = '<returnvalue-of -resultapi>'.decode('base64') print transaction.payload```

ibmamnt
2016-06-14 07:13
Or in other word, dump utility of protocol buffer message enbbeded in the result of restapi are actually fine for me.

deeflorian
2016-06-14 09:25
has joined #fabric

cbf
2016-06-14 11:02
why python?

david.acton
2016-06-14 13:48
Hi Guys, Sorry if this is the wrong forum. Can I have multiple membership service nodes?

ezhil
2016-06-14 13:54
has joined #fabric

ghaskins
2016-06-14 14:14
@ibmamnt: cant comment on python specifically, but this general notion is trivial in nodejs and its derivative environments

ghaskins
2016-06-14 14:14
if that is of interest, i could point you at some examples

cbf
2016-06-14 14:45
@david.acton: I am not sure that we are there just yet, but the intention is that the service will not be an SPoF

david.acton
2016-06-14 14:48
@cbf Thanks for the response. Is there an eta when this will not be a SPoF? Or is there a way to backup a membership node. I don’t see how I could go into production with this being a SPoF.

jonathanlevi
2016-06-14 15:28
(Good morning) @david.acton Give me a use-case please?

jonathanlevi
2016-06-14 15:29
It might be a bit more than merely having a few `membersrvc` servers running. Is it for load-balancing? Do you want them fully in synch?

david.acton
2016-06-14 15:40
@jonathanlevi: It’s mainly for redundancy. If I have a "mission critical" application that requires 99.9% uptime and I have a membersrvc on one node/machine/data centre and any of those components should go down, I cannot perform any of the membership services while that node is offline. If I’m able to have redundancy, I can mitigate against machine/data centre failures. I’d like a membersrvc nodes to act like the rest of the validating and non-validating nodes and replicate themselves.

jonathanlevi
2016-06-14 15:41
OK, thanks for the info! So a few things.

jonathanlevi
2016-06-14 15:42
1. Redundancy in terms of replicated `membersrvc` servers... (let's call them CAs going forward, easier to type ;-))

jonathanlevi
2016-06-14 15:42
is not supported at all. I can tell you right away.

jonathanlevi
2016-06-14 15:43
There isn't a RAID type/back-end syncrhonization process, which allows changes to propagate.

jonathanlevi
2016-06-14 15:43
2. However, that said, you can use more than one server to 'split the load' by having multiple CAs.

jonathanlevi
2016-06-14 15:44
Say, by region/responsibility or some other form(s) of grouping.

jonathanlevi
2016-06-14 15:45
3. Another alley worth exploring is understanding why you need the `membersrvc` uptime. In a way, when looking at the ECert/TCert (and ACert) design...

jonathanlevi
2016-06-14 15:46
(for Enrollment-, Transcation and Attribue- Certificate), you can work in a relatively asynchronous mode, if you pre-generate the certs that you would need.

jonathanlevi
2016-06-14 15:49
---- That said, and I'm really being careful here, not to over-sell... we/some of us are spending a considerable amount of time to make the CAs more of a set of standalone process, preparing also for a pretty intense set of stress testing, looking into the scalability and performance... but also the resiliency and stability, which sound like your main concerns too!

jonathanlevi
2016-06-14 15:50
I hope to be able to give you some more numbers by the end of this week, or towards the beginning of next week... but you are more than welcome to get in touch and share some of your numbers/performance/set up/etc... and we can take a look into more specifics.

jonathanlevi
2016-06-14 15:51
Don't know if I answered your question (too directly/discouragingly) or otherwise? Because I would really encourage you to try it, and provide us feedback.

cbf
2016-06-14 15:52
thanks very helpful

david.acton
2016-06-14 15:55
@jonathanlevi: Thanks so much for your response!! That is very useful information. I understand that CAs don’t need to be up on such a high level, but what is the consequence at the moment if one is destroyed though an act of God or a bad actor? So I have a CA that does Europe and it’s destroyed, what are my options then?

jonathanlevi
2016-06-14 15:56
OK. So there are two ways to think about such scenarios: 1. Act of God: say CA (let's think about VeriSign, for example. WLOG) is not available.

jonathanlevi
2016-06-14 15:57
In that case, if Verisign is offline and cannot issue new certificates (think SSL certificates) for web-servers, then it's not really the end of the world, right?

david.acton
2016-06-14 15:57
cool.. understood

jonathanlevi
2016-06-14 15:57
They just don't accept new CSR (Certificate Signing Requests)/issue new certs.

jonathanlevi
2016-06-14 15:57
OK. Number 2

jonathanlevi
2016-06-14 15:58
2. A bad actor/player. Here the concern is how to revoke someone's public key actually, right?

david.acton
2016-06-14 15:58
correct

jonathanlevi
2016-06-14 15:59
Either by using CRLs (Certificate Revocation Lists) or another mechanism... to be very honest? The CAs don't support CRLs interactively just yet.

jonathanlevi
2016-06-14 16:00
We have the mechanics, in place, for one to be able in the future to verify a (E/T/A) Certificate... but while this will be more secure in some way, it won't scale as such.

jonathanlevi
2016-06-14 16:01
My preference is to have a customizable policy. That is:

jonathanlevi
2016-06-14 16:01
You should be able to configure in a granular way, how you choose to validate certificates before accepting them.

jonathanlevi
2016-06-14 16:02
It will give you the ability to check once a week/day or so, that nothing was revoked (still, not too much load in terms of stability)

jonathanlevi
2016-06-14 16:02
That's one end of the spectrum.... or on the other hand, verify everything...

jonathanlevi
2016-06-14 16:03
... in which case, keeping a side DDoS attacks, etc, will really make you bound to the uptime of the CAs (which is probably what you were asking about earlier on).

jonathanlevi
2016-06-14 16:04
If I could choose (and I don't know enough about the application), I tend to prefer something in between.

jonathanlevi
2016-06-14 16:04
Verify that stuff in not revoked, periodically (but not for every Cert/request), but also statistically, check from a time to time....

jonathanlevi
2016-06-14 16:04
---

jonathanlevi
2016-06-14 16:05
Another related question: How many CAs/nodes do you envisions deploying? Are they all in your control (at least, at first)?

jonathanlevi
2016-06-14 16:06
What's the Transaction/Enrollment request ratio (roughly estimated, etc.). These parameters can help you choose/configure the right policy...

david.acton
2016-06-14 16:12
@jonathanlevi: Thanks again for the information!!! very very useful. I’m still getting my head around this in detail, but the customizable policy sounds good.

jonathanlevi
2016-06-14 16:14
OK. Please feel free to ask away as you are learning this. I'll just throw one last thing at you...

david.acton
2016-06-14 16:14
sure

jonathanlevi
2016-06-14 16:14
Client Authentication can also help reduce load.

jonathanlevi
2016-06-14 16:16
So in some cases, it is quick for the server to not accept connections from nodes if they don't authenticate well. If you are able to know enough about the nodes, etc (again, subject to your deployment), that's also something to look it. Not always possible (e.g. some versions of, IoT/mobile/roaming too frequently, of course... really a function of how much control you have on the nodes, and whether or not you can make it a smooth(er) process to enroll). CAs do support various levels of delegated roles (e.g. a "registrar" role that can accept new enrollments, etc.)

jeroiraz
2016-06-14 16:47
@david.acton, Just adding some extra info to the ongoing discussion with @jonathanlevi: CAs don't hold in-memory state: all required data is persisted into a relational db. You should be able to use a DB of your choice as there are no vendor-specific sql statements being used. You could have a replicated db and schedule backups as you consider appropriate, so if a CA goes down, it could be easily restarted without sync delays.

jonathanlevi
2016-06-14 16:55
Yes, we can probably move the DB settings to the configuration, so that one can replace the DB easily. At the moment we have sqlite3 in the code. But it will be easy to move out.

andres
2016-06-14 17:02
has joined #fabric

dmurik
2016-06-14 17:13
Hi all, Has anyone had success developing chaincode that imports vendored Go packages which are also imported (and vendored) by fabric itself? (I'm developing my chaincode outside of the fabric repo). For example, I want to define a function to manipulate the result of `stub.GetTxTimestamp()`. The result type is `gp.Timestamp` which is imported from `"google/protobuf"`. If I add the line `gp "google/protobuf"` to my chaincode program import lines, and add the `vendor/google/protobuf` (and its dependency `vendor/github.com/golang/protobuf`) dir to my repo, I get the following error about the colliding types: ``` ./example.go:77: cannot use timestamp (type *"http://github.com/hyperledger/fabric/vendor/google/protobuf".Timestamp) as type "org/example/vendor/google/protobuf".Timestamp in argument to isOK ``` The reason here is that I'm importing `shim` as a library, but Go libraries should not have a `vendor` dir (but fabric has a `vendor` dir because it is also an executable). If this is not clear I can open a Github issue with a proper code example.

simon
2016-06-14 17:13
yea that doesn't work

simon
2016-06-14 17:13
you can't really use a package that uses vendoring

simon
2016-06-14 17:14
exactly because of these type compatibility issues

dmurik
2016-06-14 17:15
@simon: I assume a proper solution would be to create a new `hyperledger/fabric-shim` project which includes only the shim package, without vendor. Then chaincode program should only import that package.

simon
2016-06-14 17:15
yes

dmurik
2016-06-14 17:15
@simon: It might also make the chaincode docker containers a bit smaller, on the way.

simon
2016-06-14 17:15
yes

dmurik
2016-06-14 17:17
@simon: Should I suggest this in a github issue? (I can't do this in a PR because it involves creating a new repo.)

simon
2016-06-14 17:18
yes

kostas
2016-06-14 17:20
(I'm laughing by myself with all the consequent yeses)

dmurik
2016-06-14 17:21
@simon: are you a bot that only says "yes" ?

simon
2016-06-14 17:21
yes

codascud
2016-06-14 21:09
has joined #fabric

codascud
2016-06-14 21:19
How can I create a new user using REST? I can login as “jim" via REST.. no problem with that… Thanks in advance… Referring to: https://github.com/hyperledger/fabric/blob/master/docs/API/SandboxSetup.md#vagrant-terminal-2-chaincode

cbf
2016-06-14 23:01
@dmurik: I was suggesting just that earlier in another thread... an issue would be appropriate if you haven't already created

cbruguera
2016-06-15 00:28
Hello guys! I'm reading the hyperledger fabric protocol specs and it's surely an interesting project. Very comprehensive and elegantly designed. However, I don't see much mentioning about digital currencies or other assets over the hyperledger fabric. Am I missing something? ...I know this is intended as a framework for more general blockchain applications, but what if I want to build an incentivized network with hyperledger? Is this not suitable for cryptocurrencies?

dmurik
2016-06-15 03:03
@cbf: I opened Github issue 1832: https://github.com/hyperledger/fabric/issues/1832 . Also suggested there to "hide" the protobuf internals - for example, GetTxTimestamp should return a standard Go time.Time that doesn't require another dependency.

mikeb
2016-06-15 05:37
has joined #fabric

harshal
2016-06-15 12:36
If I am updating a particular value in world state, is there any way to get the history of the changes in that value by traversing the blocks? Blocks only have hash of the world state, no I am guessing maybe playing with transaction could help, but not sure how yet.


harshal
2016-06-15 12:37
Says you can do that by 'replaying transactions'

harshal
2016-06-15 12:37
but not able to comprehend that concept.

sheehan
2016-06-15 12:55
@harshal: the API for replaying transactions is not exposed to chaincode. The best option today it to write a UTXO style ledger in your chaincode’s state.

harshal
2016-06-15 12:58
@sheehan: Google isn't helping much here :disappointed: Do you have any pointers? Essentially I want to know the history of world state, if there is any other way of doing it other than relaying on replying transactions that's fine too.

harshal
2016-06-15 13:01
Let's say I am dumping some critical info on blockchain for auditing purpose later. I want to an auditor be able to pull all critical info every dumped on blockchain for whatever reason that might be.

harshal
2016-06-15 13:04
Getting to understand UTXO, let me see how far I go with that.

sheehan
2016-06-15 13:07
it depends on what you need to audit. If it possible to include the information you need to audit in the transactions (the args of the chaincode) and then the chaincode verifies those args and makes the necessary changes to the state, it may be possible to only look at transactions when auditing past history. This is would be similar to bitcoin.

cbruguera
2016-06-15 18:59
Hey @kelly! Well, basically I'm trying to wrap my mind around the membership services of HL fabric. Let's say I'm trying to build an application for identity and KYC...

cbruguera
2016-06-15 18:59
So, fabric membership services look like a really helpful resource.

cbruguera
2016-06-15 19:00
However, there are things I don't completely understand yet...

kelly
2016-06-15 19:00
I don't know much about the membership services, but some of the folks in this channel will be able to help you out

cbruguera
2016-06-15 19:00
great, I'll ask anyway, and if you can help me (at least a bit), it'd be fine.

cbruguera
2016-06-15 19:00
What I don't really get is the topic of Certificate Authorities...

cbruguera
2016-06-15 19:01
How does that work? Do I need to make a deal with a trusted CA for it to grant certificates?... Can't I (or the application I'm building) be the "certificate authority" itself?

cbruguera
2016-06-15 19:02
Can't the very blockchain generate and grant such certificates?

cbruguera
2016-06-15 19:02
Would I have to implement the chaincode for such things myself? Or is there any solution within the framework that can help me with that?

cbruguera
2016-06-15 19:03
I mean, even if the network is permissioned, I'd like to be able to keep it decentralized to some extent, and not have to trust any external "authorities" apart from the network protocol.

cbruguera
2016-06-15 19:03
What are your thoughts on this?

cbruguera
2016-06-15 19:05
(I'll be AFK for a while, but then I'll reply. Thank you very much for your time)

kelly
2016-06-15 19:05
@cbruguera: this is a good topic for the identity channel as well

kelly
2016-06-15 19:06
in sawtooth the endpoints are registered on the blockchain

tdietter
2016-06-15 20:22
has joined #fabric

cbruguera
2016-06-15 23:36
thanks, @kelly!

cbruguera
2016-06-16 02:20
Hmm... I managed to install the dev environment (vagrant, virtualbox and all that), I could `vagrant ssh` and did `make peer`. Building of the core was apparently successful. But after that I type the command `peer`, to which the shell replies with "no command 'peer' found"... It even suggests trying with "beer", but that wouldn't actually help now. :slightly_smiling_face: :confused:

ibmamnt
2016-06-16 02:36
Looks like Docker image build has changed to make <image>. Is this correct ? ```make peer-image make membersrvc-image``` I'll raise ticket to correct old documentation as well.

cbruguera
2016-06-16 02:37
Oh, thanks!

cbruguera
2016-06-16 02:38
well, it took a while to build by doing `make peer`... Is that lost work? :grimacing:

ibmamnt
2016-06-16 02:44
It took aboud 1 minutes to build the image for me. If the base image is not there hyperledger/fabric-baseimage:x86_64-0.0.10, it has to pull from Docker hub, this will add some minutes.

cbruguera
2016-06-16 02:54
Thanks, @ibmamnt, that was really helpful.

cbruguera
2016-06-16 02:55
although: "no rule to make target 'membersrvc-image'. Stop." :grin:

ibmamnt
2016-06-16 03:40
I have run "make" command at /opt/gopath/src/github.com/hyperledger/fabric. Also make sure you have latest code. Mine is this: ```$ git rev-parse --short HEAD abfb8ce```

cbruguera
2016-06-16 03:43
hmm nope, that's not the hash that I'm seeing... Maybe I should git pull or something?

ibmamnt
2016-06-16 04:42
If you need to test against the latest code, you should.

zuowang
2016-06-16 05:01
CORE_SECURITY_ENABLED=true ./peer chaincode query -u jim -l golang -n 3ad1fc0c484709031dc75e9f0fe432a1b4940f6cdabd2484c4dfe457666d58dc93e968d4eb444fff39bf6e47b0baa1d6b4948010d46276af4485e9ea035e3299 -c '{"Function": "query", "Args": ["a"]}'

zuowang
2016-06-16 05:01
Error: Error querying chaincode: rpc error: code = 2 desc = "Decryption failed."

zuowang
2016-06-16 05:01
Why I got a "decryption failed" error?

zuowang
2016-06-16 05:03
I started 4 validator, login with jim on command line, deployed the chaincode, but failed to query it

zuowang
2016-06-16 05:18
if len(ct) <= primitives.NonceSize { return nil, utils.ErrDecrypt }

zuowang
2016-06-16 05:19
it failed here. Why I can't get primitives.NonceSize?

zuowang
2016-06-16 06:26
Seems I forgot to build with new command"make peer" and the binary is in "build/bin/peer"

nits7sid
2016-06-16 06:59
Why chaincode to chaincode interaction is not possible when privacy is enabled?

garisingh
2016-06-16 14:34
@nits7sid: unfortunately this is a known gap right now. it might be hidden in one of the closed issues and/or PRs

pkulkark
2016-06-16 15:52
Hi, I'm a newbie here. Trying to understand how transactions are implemented. I see that when a 'invoke' function is called, the args contain the data (or world state) that is written to the block. When a GET operation is done on the API : /transactions/{uuid}, the response contains a payload field which is hashed. What does this payload consist of? Is it the hash of the args sent when executing a chaincode function? How is this hash calculated? Is there any way to get the data from it?

harshal
2016-06-16 15:57
me and @pkulkark are trying to write a sample application where we are interested in tracking the historical changes for a particular value in a world state. Since apart from world state, older blocks don't keep the world state (but only hash of world state) we are kinda stuck there. All we want to do is plot the changes in the value against time while traversing the blocks. Also, we don't want to overload world state by keeping all the old data in world state itself. Any pointers?

harshal
2016-06-16 16:00

harshal
2016-06-16 16:00
Especially Point 1.

harshal
2016-06-16 16:01
>Point in time queries - The ability to query chaincode state at previous blocks and easily trace lineage without replaying transactions

harshal
2016-06-16 16:01
But until that happens is there any way around with existing impl?

garisingh
2016-06-16 16:12
@harshal and @pkulkark - it kind of depends on exactly how complex your chaincode logic is. The actual payload of every transaction is stored within each transaction in a block (function invoked and parameters passed). Depending on what your actual chaincode functions do, it is possible to either "replay" the transactions outside the chaincode just by parsing each block / set of transactions or depending on the payload itself (e.g. you are actually passing the updated state in the invoke), you could use that. The other option would be to use the custom events (which I think are now committed) from within your chaincode to output the latest state at the end of a function invocation within chaincode. These events would be available via the event API or should be available waiting the transaction metadata in the recorded blocks

garisingh
2016-06-16 16:12
(not optimal / ideal) but could / should work

harshal
2016-06-16 16:32
@garisingh: thanks. The restful API endpoint *GET /transactions/{UUID}* returns only payload hash. I was trying to dig around code to see how this payload hash is calculated.

harshal
2016-06-16 16:36
I presume the payload is converted into a byte array and then a hash is calculated on that byte array.

garisingh
2016-06-16 16:42
should be base64 encoded actually

garisingh
2016-06-16 16:42
at least transactions are base64 encoded on the blocks endpoint

harshal
2016-06-16 16:43
@garisingh: cool. :slightly_smiling_face:

sajz
2016-06-16 17:53
has joined #fabric

arner
2016-06-16 19:52
I found this in core.yaml: golang: # This is the basis for the Golang Dockerfile. Additional commands will # be appended depedendent upon the chaincode specification. Dockerfile: | from hyperledger/fabric-baseimage #from utxo:0.1.0 COPY src $GOPATH/src WORKDIR $GOPATH Does that mean we can add something to the baseimage for the docker container the go code is running in?

ghaskins
2016-06-16 19:53
@arner: yes, most likely

ghaskins
2016-06-16 19:53
if this is a customization for your environment, you can just select a different image entirely if you like

ghaskins
2016-06-16 19:54
(see the commented out utxo

arner
2016-06-16 19:54
So would that be a possible way to have oracle-like behaviour? Or would that be considered bad practice..

arner
2016-06-16 19:55
I mean, in theory you could maybe even run a light bitcoin node or connect to the ethereum network

ghaskins
2016-06-16 20:01
you mean to place some other task in that container as an ENTRYPOINT type process?

arner
2016-06-16 20:07
Yeah, something like that... Would be kind of a hack and I don't know how it would play with the on-demand nature of the vm. Maybe it'd be better not to run a fullblown process but still it opens up possibilities.. Can we use the http library to make calls outside of the vm

arner
2016-06-16 20:08
?

ghaskins
2016-06-16 20:18
right now? yes. Long term, no, that would be bad

ghaskins
2016-06-16 20:19
right now little is done to lock it down, but this needs to change

ghaskins
2016-06-16 20:19
the only thing chaincode should do is react to things coming from the peer, like invoke()/query() requests

ghaskins
2016-06-16 20:19
and those methods should be modeled on a pure function where the only persistence is the world-state

ghaskins
2016-06-16 20:20
if you reach outside the container, it will impact the determinism of your response

arner
2016-06-16 20:21
Right. That would be bad indeed. Is there any thought being put into how to handle the oracle problem? Or would it be less of an issue in a permissioned environment?

ghaskins
2016-06-16 20:23
Yes, system chaincode is part of that story

ghaskins
2016-06-16 20:23
but there are still key parts missing

garisingh
2016-06-16 22:08
@arner - @jzhang has been working on some oracle thoughts as well. might be good for you to sync with him

pax
2016-06-17 00:20
has joined #fabric

mikezaccardo
2016-06-17 01:31
@garisingh @iamsamwood re: your discussion above about asset management example: it does not appear that the REST API alone can be used for this example given then need for certs in metadata, but running the [https://github.com/hyperledger/fabric/tree/master/examples/chaincode/go/asset_management/app] app does work

mikezaccardo
2016-06-17 01:32
it requires a cluster of validating peers with security and privacy enabled (and probably something other than noops for consensus, but not totally sure if that’s required)

mikezaccardo
2016-06-17 01:33
you can set this up using the compose blueprints that are located somewhere in the codebase (the link to it has since broken)

mikezaccardo
2016-06-17 01:34
(i’ve been using this blueprint that i’m developing, instead [https://github.com/cloudsoft/brooklyn-hyperledger])

mikezaccardo
2016-06-17 01:35
@vinding a while back you asked if it’s straightforward to set up (sorry for delay) — it is straightforward to set up using my blueprint, but developing it was tricky because i had trouble finding documentation for everything that was needed by it. it ended up being some trial end error wrt the environment variables passed to the containers.

vinding
2016-06-17 01:35
has joined #fabric

mikezaccardo
2016-06-17 01:38
if anyone’s curious to see it actually run, i made this video: https://www.youtube.com/watch?v=0HYzxmnP3bA

muralisr
2016-06-17 01:59
@mikezaccardo: very nice! thanks for the post

novusopt
2016-06-17 07:49
@garisingh: is there an issue open for that?

garisingh
2016-06-17 08:13
@novusopt: issue for the oracle stuff? (forgot what I commented on : ) )

ylh
2016-06-17 08:33
has joined #fabric

novusopt
2016-06-17 09:03
@garisingh: sorry, i mean -> chaincode to chaincode interaction is not possible when privacy is enabled?

garisingh
2016-06-17 09:29
ah - that one - sorry - was digging thru issues - https://github.com/hyperledger/fabric/issues/1530 - mentions this but was closed because part of it was fixed (cc -> cc with security enabled but privacy false now works)

garisingh
2016-06-17 09:29
someone should open another issue on cc to cc with privacy on

daichiiwata
2016-06-17 11:16
has joined #fabric

muralisr
2016-06-17 11:56
@garisingh: I’ll open an issue for that… @novusopt the Description in PR for #1530 mentions the limitation that cc-cc privacy on is not enabled

santhoshr
2016-06-17 12:00
has joined #fabric

novusopt
2016-06-17 12:04
@muralisr: thanks!

novusopt
2016-06-17 12:05
@muralisr: but cc -cc with security enabled && privacy disabled works?

muralisr
2016-06-17 12:07
@novusopt: yes, that should work

novusopt
2016-06-17 12:11
@muralisr: thanks!

mikezaccardo
2016-06-17 15:11
hi all, i’ve expanded my deployment work to create clusters of VPs on different, geographically separated data centers, all of which report to one root node VP. i’ve found that the asset management example consistently fails on these distributed setups. containers for the chaincode are NOT deployed on the VP hosts. here’s a log of the app failing: https://gist.github.com/mikezaccardo/cb7112315dcedb0d242a37ea853f3ce6

mikezaccardo
2016-06-17 15:12
since these setups work when the VPs are all co-located, i’m thinking it may be some kind of timeout issue — is there a low timeout for chaincode deployment that may be failing here? i don’t see logs that confirm this, though.

mikezaccardo
2016-06-17 15:13
any help on this would be greatly appreciated. it’s fairly time sensitive since i have a talk at DockerCon on tuesday during which i’d like to demo this. thanks a lot.

jzhang
2016-06-17 15:51
I’ve been working on two enhancements on the side that I think will be useful at some point down the road beyond a basic robust fabric: 1) persistent events support by utilizing an external message queue, 2) asynchronous transaction API parallel to the /chaincode REST API. details are here including instructions to try out the prototype in the fork: https://github.com/jimthematrix/blockchain-features

jzhang
2016-06-17 15:53
would love to get feedback on 1) whether these features should continue to be worked on, so that they may one day be merged into the fabric, 2) volunteers to help making them more robust

kostas
2016-06-17 16:18
@jzhang: #2 in particular looks :ok_hand:

kostas
2016-06-17 16:18
you may also want to post on the fabric mailing list about this

sajz
2016-06-17 16:32
Hi there, I have a maybe naive question, I am just trying to understand the fabric spec right : Do non-validating peers need to be certified by the CA to handle the API requests and event stream ? The CA is used to allow the peers into the network, then who decides wether it's a peer (nvp) or a validator (vp) ? thanks!

jzhang
2016-06-17 17:14
@kostas: thanks for the comment. I posted to the fabric mailing list

muralisr
2016-06-17 17:50
@jzhang: resounding yes to both !

nao
2016-06-17 18:01
has joined #fabric

garisingh
2016-06-17 19:31
@sajz - good question - 2 part answer for now. First, we currently have a static whitelist for validating peers which you need to be added to (that list is in core.yaml and needs to be the same across all VPs) (I forget if we also set the total number somewhere as well). Second, in order to connect to the network as a validating peer, you need to have a role of validator which is assigned to you when you are registered with membership services (the ECA to be exact). If you have the role of validator, when you enroll (which happens under the covers when starting a peer), the certificate you are issued with have the role embedded in it as an attribute

garisingh
2016-06-17 19:32
Short answer: you need to be added to membership services with the role of validator and need to be added to the whitelist of validating peers in the config today

garisingh
2016-06-17 19:32
we'll be adding dynamic whitelist in the future as well

garisingh
2016-06-17 19:33
@kostas @simon @cca correct me if I said anything wrong ^^^^^

kostas
2016-06-17 20:17
right on the "you need to be added to memserv as a validator", right on the "we'll be adding dynamic whitelisting", wrong on the "static whitelisting". (we were about to add it, but we rightly ditched it in favor of a better, less hacky implementation that will make use of the event mechanism that was just added). as things stand right now, `vp2` can be taken offline, replaced with a different `vp2` and the system will admit them just fine. this is obviously not acceptable. (by the way, you set the number of expected VP nodes in `consenus/obcpbft/config.yaml`)

muralisr
2016-06-17 20:21
@kostas: can you expand on the _ less hacky implementation that will make use of the event mechanism that was just added_ please ?

kostas
2016-06-17 20:41
@muralisr: modify the stack so as to give us `PeerConnected/PeerDisconnected` events and we can process these via the events goroutine in `obcpbft`

muralisr
2016-06-17 20:45
@kostas: thanks

nkunkel
2016-06-17 23:15
Hi, for the fabric chaincode examples, most of the init/invoke functions seem to have the arguments as an array of strings. Is this a requirement? Or can I change it to an array of bytes instead? I'm trying to pass JSON.

nkunkel
2016-06-18 00:00
Or keep it as an array of strings, but then I'm confused on how to have a JSON string inside a JSON string literal

nkunkel
2016-06-18 00:17
never mind, got it

sajz
2016-06-18 14:01
Thanks for the answers. So no whitelisting at all for now ? @kostas

tuand
2016-06-18 14:14
@sajz not currently. Discussion in issue #756

basav
2016-06-18 14:29
has joined #fabric

nits7sid
2016-06-18 15:36
make: warning: Clock skew detected. Your build may be incomplete... what this warning is about?

cbf
2016-06-18 16:28
is this a local build?


cbf
2016-06-18 16:29
if local, you can try to synch your clock with an NTP service - if this is Travis or Jenkins, LMK

garisingh
2016-06-18 17:09
@kostas - right - thanks - should have been more clear. but in the end, while you can have a different node connect as `vp2` if `vp2` goes down, that does mean that you would also have had to been able to enroll the second peer who wants to be `vp2` as well (since enrollPwd is one shot only). So if you have security enabled and you only ever issued enrollment credentials to 4 peers with validator role, no one else could actually join the network as `vp0,vp1,vp2 or vp3`

nits7sid
2016-06-19 02:01
@cbf: it is a local build

c0rwin
2016-06-19 10:30
has joined #fabric

nits7sid
2016-06-19 12:40
I am facing this error when trying to deploy the chaincode on docker setup... This is on the new fabric code. i am using pbft/batch consensus 12:22:28.448 [dockercontroller] deployImage -> ERRO 030 Error building images: cannot connect to Docker endpoint 12:22:28.471 [dockercontroller] Start -> ERRO 031 start-could not recreate container cannot connect to Docker endpoint

garisingh
2016-06-19 18:50
@nits7sid 1) are you running all the peers in docker containers? 2) are you running in Vagrant? 3) if not running in Vagrant, you'll need to configure the docker daemon on your host system to listen on tcp (e.g. `-H ) instead of just the default unix socket 4) Are you using the Docker compose files in the *bddtests* folder?

mikezaccardo
2016-06-19 20:17
i fixed my issue above by increasing the value for `CORE_PBFT_GENERAL_TIMEOUT_REQUEST`

mikezaccardo
2016-06-19 20:17
i now have the asset management demo working across three different data centers

mikezaccardo
2016-06-19 20:17
i will make another video showing this v soon

tuand
2016-06-20 01:05
@garisingh: you are correct. say vp2 crashes , if a different vp2 tries to login with the same credentials, you'll get an error. If the original vp2 restarts, it does rejoin as it has saved its configuration

nits7sid
2016-06-20 02:50
@garisingh: 1.I am running this outside vagrant. 2. I am running the set up by referring to the doc given here https://github.com/hyperledger/fabric/blob/master/docs/dev-setup/devnet-setup.md

buhrmi
2016-06-20 04:18
so I need some help ... assume i have an encrypted value, basically a "proof-of-stake" and i want to store this value in the hyperledger blockchain attached to some identifier that can identify me... how do i do that? it should be a simple use case but i don't know how to do that

buhrmi
2016-06-20 07:16
so i just wanna store a value on the blockchain similar to this https://proofofexistence.com

buhrmi
2016-06-20 07:16
a value that proofs a stake in something simply by existing

simon
2016-06-20 07:35
i think you need to read about chaincodes

buhrmi
2016-06-20 07:54
i'm not very familiar with golang

sajz
2016-06-20 07:55
Quick question: is the notion of block mandatory in the protocol? I've seen "block on demand" on some presentation, what does this mean exactly?

garisingh
2016-06-20 10:18
@buhrmi: can you describe the data structure you want to store a bit more - e.g. will you have a single identifier for each individual and you then want to be able to store multiple multiple key / value pairs associated with the individual?

ashnur
2016-06-20 10:22
has joined #fabric

ashnur
2016-06-20 10:24
hi, i am trying to read up on fabric, where should I go for some kind of concise information?

buhrmi
2016-06-20 10:27
@garisingh: the data structure is super simple. in any blockchain there are addresses (public keys), and i just want to store a character string attached to an address that I own the private key to. similar to namecoin, but without the requirement to burn energy resources on mining

garisingh
2016-06-20 10:28

garisingh
2016-06-20 10:35
@buhrmi: thanks - thought as much. Fabric does not natively have the concept of addresses / accounts like Bitcoin or Ethereum, but you can definitely do this. I'd recommend starting simple and taking a look at https://github.com/hyperledger/fabric/blob/master/examples/chaincode/go/chaincode_example06/chaincode_example06.go as it is a simple example of just putting / getting / deleting key/value pairs from the blockchain and you can take a quick look at https://github.com/IBM-Blockchain/learn-chaincode to get the basics on how to write chaincode and set up your environment

ashnur
2016-06-20 10:42
this hyperledger thing at first looked promising but the more i read the more it becomes a source of anxiety

buhrmi
2016-06-20 10:45
no clue what's going on lol

buhrmi
2016-06-20 10:46
just a general clue on "where it's headed"

buhrmi
2016-06-20 10:49
imma really just looking for a solution for my simple use case of storing an arbitrary value inside the ledger under an address that I can control and change... in a way that i can refer other people to the address and say "look, look, this value exists in the blockchain"

ashnur
2016-06-20 10:49
you can get that in a number of other ways

ashnur
2016-06-20 10:50
you could just put it anywhere on the internet in great number and have a hash for it

ashnur
2016-06-20 10:50
my issue here is that it seems we are running forward without at least opening our eyes, not to mention to stop and look around

ashnur
2016-06-20 10:51
i see "whitepapers" with such low quality that I know blogposts with more careful analysis

ashnur
2016-06-20 10:51
anyway, back to reading :slightly_smiling_face:

buhrmi
2016-06-20 10:52
well... "put it anywhere on the internet" is not "storing it in the blockchain"

buhrmi
2016-06-20 10:53
gonna work on something too ^^

buhrmi
2016-06-20 10:56
maybe i can get to a point where i can use this https://npm.mirrors.ustc.edu.cn/package/ibm-blockchain-js to do what i want ...

garisingh
2016-06-20 11:07
@buhrmi: take a look at https://github.com/IBM-Blockchain/learn-chaincode - it should really help get you started and give you an idea of how things work with chaincode

buhrmi
2016-06-20 11:16
@garisingh: yeah but i'm confused. i can deploy chaincode without providing any form of authentication and/or private key? also, is the variable "hello_world" that is written to namespaced in some way? could anyone overwrite this variable? is it using the github user id?

buhrmi
2016-06-20 11:35
it looks like the provided examples do "kinda" what i want, except for the fact that the blockchain is not production ready ....

buhrmi
2016-06-20 11:36
anybody from IBM here? what needs to be done to get this thing out?

buhrmi
2016-06-20 11:42
this is more or less what my business is looking for right now

buhrmi
2016-06-20 11:44
but it's looking for "the" blockchain.. not for "a" blockchain

ashnur
2016-06-20 11:46
?

ashnur
2016-06-20 11:46
what is "the blockchain" ?

shubhamvrkr
2016-06-20 11:52
How do we execute the docker-compose .yml files to set up network ?

simon
2016-06-20 11:54
ashnur: why anxiety?

ashnur
2016-06-20 11:55
simon: it is the same feeling as if I am in a car with no windows that is on the freeway going with 200 mph and I don't have much control over it :slightly_smiling_face:

simon
2016-06-20 11:56
what specifically?

simon
2016-06-20 11:56
because it feels complicated?

buhrmi
2016-06-20 11:56
@ashnur: "the blockchain" is basically "the matrix"

buhrmi
2016-06-20 11:57
haha

buhrmi
2016-06-20 11:57
it's a simulation of everything humans do

ashnur
2016-06-20 11:57
simon: no, because I have only minimal trust in people writing these codebases. :slightly_smiling_face: like with anything else

simon
2016-06-20 11:58
that is a good start

simon
2016-06-20 11:58
i appreciate any code review

buhrmi
2016-06-20 11:59
is there a publicly accessible test-blockchain based on ibms proposal?

simon
2016-06-20 11:59
there is a bluemix service where you can run your own blockchain, i think

buhrmi
2016-06-20 12:00
yeah i just tried it ... 30 days and then they want money

buhrmi
2016-06-20 12:00
they should provide a public test blockchain where we can deploy our codez

simon
2016-06-20 12:01
well, hyperledger is not meant to be a public access (unpermissioned) chain

simon
2016-06-20 12:01
you can certainly run your own chain

buhrmi
2016-06-20 12:02
ah, i thought hyperledger gonna create "the one" blockchain where everybody connects to. similar to "the one" internet

ashnur
2016-06-20 12:02
there is no "the one" internet though :slightly_smiling_face:

buhrmi
2016-06-20 12:02
well there is more or less ...

virajkamat
2016-06-20 12:03
has joined #fabric

buhrmi
2016-06-20 12:03
if i'm not connected to "the one" internet right now, what internet am i connected to?

simon
2016-06-20 12:03
buhrmi: no

virajkamat
2016-06-20 12:04
Hey guys, was hoping to get some inputs on docker compose execution for 4 peers and a ca

simon
2016-06-20 12:04
you're connected to your visible subset of the net

simon
2016-06-20 12:04
virajkamat: what's the specific issue?

buhrmi
2016-06-20 12:04
yeah, but that visible subset is supposed to be "the one" internet

simon
2016-06-20 12:04
everybody sees a different version

ashnur
2016-06-20 12:05
exactly

simon
2016-06-20 12:05
it's like reality

virajkamat
2016-06-20 12:05
Under bddtest there is a yml file for batch consensus. How do i execute the file in order to the setup a network

simon
2016-06-20 12:05
network existentialism

simon
2016-06-20 12:05
virajkamat: docker-compose -f <file> up, i think

buhrmi
2016-06-20 12:05
anyway

ashnur
2016-06-20 12:05
fabric of spacetime

buhrmi
2016-06-20 12:06
i thought hyperledger's goal was to try to provide a blockchain that is as open and accessible as the internet today

simon
2016-06-20 12:07
no

buhrmi
2016-06-20 12:07
too bad

simon
2016-06-20 12:07
not as i understand it

buhrmi
2016-06-20 12:07
well but i want something like that

buhrmi
2016-06-20 12:07
lol

ashnur
2016-06-20 12:07
buhrmi: i am not sure if you really want that

buhrmi
2016-06-20 12:07
i do

buhrmi
2016-06-20 12:07
i know what i want lol

ashnur
2016-06-20 12:08
however this correlates to something I was thinking about the other day

ashnur
2016-06-20 12:09
that if we had a right to the blockchain as we have right to freedom of speech, and this blockchain would be run by governments and firms and basically everyone in some aspect, it could simplify everything humans do and requires auditing

buhrmi
2016-06-20 12:09
@ashnur: yeah that's what i wanna build

buhrmi
2016-06-20 12:10
i thought that's hyperledger's vision

simon
2016-06-20 12:10
centralization is the bane of all systems

simon
2016-06-20 12:10
better come up with a structure like the internet

simon
2016-06-20 12:10
the network of networks

ashnur
2016-06-20 12:10
but the question as always is, what is the incentive to manage this for those who actually have the resources, and what are the guarantees that they will not steer it in a way that benefits them more than the common people

simon
2016-06-20 12:10
figure out a network of blockchains

buhrmi
2016-06-20 12:10
yeah well i think the fabric is a good starting point

simon
2016-06-20 12:10
i.e. a cross-chain transaction protocol

simon
2016-06-20 12:11
make it truly "hyper" ledger, like hypertext

buhrmi
2016-06-20 12:11
yup

buhrmi
2016-06-20 12:11
really would love a public test-chain

buhrmi
2016-06-20 12:12
maybe i can propose it

simon
2016-06-20 12:12
maybe you can host one

buhrmi
2016-06-20 12:12
on my phone

simon
2016-06-20 12:12
unlikely

buhrmi
2016-06-20 12:13
pretty sure i can... have to do some arrangements with my company first tho ... and talk to IBM ^^

buhrmi
2016-06-20 12:13
but now is game of thrones time..

yacovm
2016-06-20 13:09
has joined #fabric

cbf
2016-06-20 13:24
there will be blood @buhrmi

nikkotorcita
2016-06-20 13:58
has joined #fabric

buhrmi
2016-06-20 14:00
little bit of blood is normal if it's the first time

arnaud
2016-06-20 14:07
anyone interested in learning more about what's going on may want to join the Fabric call which is taking place now

arnaud
2016-06-20 14:07
https://meetings.webex.com/collabs/meetings/join?uuid=M7ME8OZ0FX8ZY45U79CEWHFSOD-9VIB Meeting number: 195 533 376 Audio Connection:  +1-415-655-0001 US TOLL Access code: 195 533 376

buhrmi
2016-06-20 14:15
still very confused about the namespacing/permissions of the variables that are stored with `stub.PutState` in the chaincode examples

buhrmi
2016-06-20 14:16
are they global? what are they tied to? is there documentation about that?

simon
2016-06-20 14:18
buhrmi: the variables are per-chaincode

simon
2016-06-20 14:18
buhrmi: imagine one key/value table per chaincode

pschnap
2016-06-20 14:21
@buhrmi from what I recall there's a chaincode instance name and there are variable names within the chaincode for the state; the actual name the variables are stored under is chaincode_instance + internal_key so it can't be accessed by other chaincode instances, only the instance using it

buhrmi
2016-06-20 14:21
i see... can a chaincode be changed once it has been deployed?

ghaskins
2016-06-20 14:22
@buhrmi: right now, you can only upload a new one…eventually we will have “upgrade” as part of lifecycle management but it will be controlled

buhrmi
2016-06-20 14:25
@ghaskins: okay i was hoping the answer would be "no" cause i assume other users will interact with some deployed chaincode and it would be weird if behavor suddenly changes

ghaskins
2016-06-20 14:25
thats where the “controlled” comes in

ghaskins
2016-06-20 14:25
I think chaincode will need to have facilities that allow it to take part of when/whether it can be upgraded

ghaskins
2016-06-20 14:26
(which could include human/external approval)

ghaskins
2016-06-20 14:26
so, in this system, a chaincode would be written such that it disables upgrade as part of its policy should that be desired

ghaskins
2016-06-20 14:27
or, perhaps it requires 2-3 stakeholder approval, etc etc

buhrmi
2016-06-20 14:27
note that i'm thinking about a scenario where the blockchain is deployed publicly, inviting anyone to deploy chaincode

ghaskins
2016-06-20 14:28
shouldnt matter

ghaskins
2016-06-20 14:28
a blockchain is about governing change via rules that are agreed upon by consensus…you can make those rules whatever you want

buhrmi
2016-06-20 14:28
is there an example of one chaincode querying another chaincode?

ghaskins
2016-06-20 14:29
yes


buhrmi
2016-06-20 14:29
cool ...

buhrmi
2016-06-20 14:30
also, this `"secureContext": "user_type1_xxxxxxxxx"` in the rest api, is this ibm bluemix specific?


ghaskins
2016-06-20 14:31
first is raw/direct chaincode to chaincode invoke, second is chaintool based

buhrmi
2016-06-20 14:31
ok cool got it

ghaskins
2016-06-20 14:32
I dont think secureContext is bluemix specific

buhrmi
2016-06-20 14:36
hmmm to me it looks like the /registrar endpoint is tied to IBM bluemix credentials to authorize ...

muralisr
2016-06-20 14:36

ghaskins
2016-06-20 14:37
@buhrmi: I wouldnt be surprised if the membersrvc running on bluemix was integrated with bluemix credentials, but that doesn’t mean membersrvc in general is

ghaskins
2016-06-20 14:37
i thought you were asking about the secureContext field in general

buhrmi
2016-06-20 14:40
yeah i don't like this "secureContext" approach at all

buhrmi
2016-06-20 14:42
it has the word "secure" in it but i don't know how it's secure ^_^. the call is not signed or anything

buhrmi
2016-06-20 14:42
the POST /chaincode call

bfuentes
2016-06-20 14:43
has joined #fabric

ghaskins
2016-06-20 14:43
the problem is you are misunderstanding the architecture/intent there

ghaskins
2016-06-20 14:43
its not your fault, its confusing and poorly communicated, this hung me up too

ghaskins
2016-06-20 14:43
the issue is that you need to understand that part of that flow is intended to be part of the "client context"

ghaskins
2016-06-20 14:44
that is, if you look at a flow like this [client]->(rest)->[nvp]->(grpc)->[vp vp vp]

ghaskins
2016-06-20 14:45
its easy to assume that the (rest) portion is your client talking to the network

ghaskins
2016-06-20 14:45
and in that sense, the concept of “secureContext” is totally broken

ghaskins
2016-06-20 14:45
but the problem is, thats not the intended architecture

ghaskins
2016-06-20 14:46
rather, it looks like this: [trusted: [client]->(rest)->[nvp]]->(grpc)->[untrusted: [vp vp vp]]

ghaskins
2016-06-20 14:47
or, really, [trusted: [client]->(http)->[webtier]->(rest)->[nvp]] ….

ghaskins
2016-06-20 14:47
once you understand that, things start to make more sense

ghaskins
2016-06-20 14:47
also know that work is under way to collapse much of that via the SDK

ghaskins
2016-06-20 14:48
so, the “secureContext” is a mechanism that something like a trusted webtier and a trusted NVP convey identity via proxy

ghaskins
2016-06-20 14:48
for hosted wallets, etc

ghaskins
2016-06-20 14:49
if you wanted more of an SPV wallet type thing, you want to be using the SDK in which case the functions of client/nvp are collapsed together

ghaskins
2016-06-20 14:49
make sense?

buhrmi
2016-06-20 14:49
NVP VP SPV are abbreviations for....? ^_^

ghaskins
2016-06-20 14:50
VP= validating peer, NVP = non-validating peer, SPV is a bitcoin term, i think it stands for single payment verification

buhrmi
2016-06-20 14:50
ah okay , yeah then it makes sense

ghaskins
2016-06-20 14:51
i had the same thought as you: “how is this not completely broken”, heh

buhrmi
2016-06-20 14:51
haha

ghaskins
2016-06-20 14:51
understanding the above is key

ghaskins
2016-06-20 14:52
related, see the concept of a “registrar” in membersrvc parlance

buhrmi
2016-06-20 14:52
but still, i think it would be "cooler" to be able to deploy chaincode without having a user database and just use a "whatever-publickey" to "log in" and provide signatures

ghaskins
2016-06-20 14:52
im not sure what you mean

buhrmi
2016-06-20 14:53
i assume the membersrvc thing (i haven't looked into that very much) is looking up credentials to provide this "secureContext" value

ghaskins
2016-06-20 14:54
well, transactions on the actual network are signed by transaction-certificates which are subordinate to an enrollment certificate

ghaskins
2016-06-20 14:55
the membersrvc function is to manage/disseminate credentials and the issuance of certificates, of which secureContext plays a part

buhrmi
2016-06-20 14:55
yeah, so without having a transaction certificate signed by that enrollment certificate i can't send transactions, right?

ghaskins
2016-06-20 14:56
something like that, but that is on the (grpc) side of the link

buhrmi
2016-06-20 14:56
i want to deploy a node that does not use an enrollment certificate

ghaskins
2016-06-20 14:56
so, turn off security in your network

buhrmi
2016-06-20 14:56
and use self-signed everything

buhrmi
2016-06-20 14:56
will try

ghaskins
2016-06-20 14:57
or, turn on security but create an ACL for deploying chaincode that doesnt check tcerts

ghaskins
2016-06-20 14:57
or, do whatever you want

buhrmi
2016-06-20 14:57
haha

buhrmi
2016-06-20 14:57
sounds good :smile:

ghaskins
2016-06-20 14:57
all that matters is you have rules and all the nodes agree to them

buhrmi
2016-06-20 14:58
will experiment a bit

buhrmi
2016-06-20 14:58
i'm off to sleep

buhrmi
2016-06-20 14:58
thanks for the explanations

ghaskins
2016-06-20 14:59
the bottom line: your system decides what constitutes a valid transaction…if you want a system that doesnt require a tcert to be valid, then you code it that way

ghaskins
2016-06-20 14:59
(the funny thing being, thats the easy case ;)

ghaskins
2016-06-20 15:00
the hard case is when you actually do want them

buhrmi
2016-06-20 15:02
so i want a blockchain where i (or anyone else) can deploy chaincode without a certificate, while still being able to prove ownership over the deployed chaincode by having a private key and the chaincode is signed

buhrmi
2016-06-20 15:04
the attitude being "not giving a f*ck what's in the system, but if somebody tells me that he/she put it in there, he better be able to prove it"

simon
2016-06-20 16:38
yea good luck administrating that system

simon
2016-06-20 16:38
people will host warez servers in your chaincode

codascud
2016-06-20 18:16
@ghaskins: thanks for the explanation. really helpful.. In case of really, [trusted: [client]->(http)->[webtier]->(rest)->[nvp]] architecture. How (and why?) should one use the POST localhost:5000/registrar API?

ghaskins
2016-06-20 18:17
@codascud: I am not too familiar with that aspect of the system so I am not sure

codascud
2016-06-20 18:18
got it.. thanks…

ghaskins
2016-06-20 18:18
but I can say this: there is the concept of registrar in the SDK that is probably related

ghaskins
2016-06-20 18:18
and in that model, the registrar is responsible for proxy login of the things it is hosting

ghaskins
2016-06-20 18:19
so I suspect the /registrar endpoint is related to that

ghaskins
2016-06-20 18:20
e.g. if I am a wallet hoster…i might have X clients whom are integrated with some extrinsic identity system that the wallet hoster and wallet apps federate to

ghaskins
2016-06-20 18:20
one the hosting tier is happy with a security principal, it acts as a registrar for that principal w.r.t. the block chain

ghaskins
2016-06-20 18:21
IOW, the hosting tier, using registrar credentials, logs in the subordinate identity via proxy

codascud
2016-06-20 18:21
thanks.. Is CA different from registrar?

ghaskins
2016-06-20 18:22
i think so

ghaskins
2016-06-20 18:22
i think the registrar is a type of role in the identity system the CA manages

ghaskins
2016-06-20 18:22
i.e. one CA might have many registrars, each of which are responsible for some set of subordinate identities

garisingh
2016-06-20 18:23
@codascud: @ghaskins is fairly close in his explanation. Some of this is left over from previous ideas about non-validating peers (a concept which is more or less disappearing) as well as the lack of a native client for the fabric and membersrvcs APIs (the gRPC stuff - which the new Node SDK actually uses)

garisingh
2016-06-20 18:26
The various security endpoints exposed on the peer (/registrar, the get enrollment cert and get transaction cert) basically invoke a membersrvcs "client" code which is embedded in the peer code under the overs. So `/registrar` assumes that someone has already added users to the ECA (in the past via membersvcs.yaml , now also via the client SDK) and what it does is log in the user and download the enrollment material under the control of the peer (you can actually see all of the files in the `/var/production/.membersvcs` directory under something like clients

garisingh
2016-06-20 18:28
as @ghaskins says, this is then used a a pseudo *wallet* when using the transitional REST / JSON-RPC APIs (you include secureContext in the REST request and the peer hosting that endpoint checks to see if it has the enrollment material for that "user" in its file system) to create signed transactions which are then submitted to the blockchain

ghaskins
2016-06-20 18:29
@garisingh: that makes sense to me, thanks for clarifying

garisingh
2016-06-20 18:30
And the original concept was that the entity hosting the peer would put their own security (e.g. proxy, API mgmt) in front of the REST endpoint. This is still viable, although moving forward we have the new NodeJS SDK and I'd expect that we'll actually start building wallets / REST servers, etc on top of that and extracting this stuff out of the peer code itself

garisingh
2016-06-20 18:31
also, the new Node SDK gives full access to membersvcs directly rather than going through the peer. The plan is to also start building SDKs in other languages as well as extract the current Go client out of the peer as well for standalone use

garisingh
2016-06-20 18:31
OKAY - my essay is over now :wink:

codascud
2016-06-20 18:32
thanks @garisingh @ghaskins for the explanation!

ghaskins
2016-06-20 18:32
@garisingh: everything you said is consistent with my understanding (except I wasnt as familar with the legacy paths, like /registrar) so thank you for all that

garisingh
2016-06-20 18:34
no worries. we should probably offer up some deep dive sessions on membersvcs, the new SDK, etc to get folks up to speed on all of the changes, etc plus what all this stuff actually does / means. Its definitely not entirely obvious

ghaskins
2016-06-20 18:39
@ghaskins uploaded a file: https://hyperledgerproject.slack.com/files/ghaskins/F1JHTDZ97/pasted_image_at_2016_06_20_02_39_pm.png and commented: This is the picture I have in my head describing all this

ghaskins
2016-06-20 18:40
the concept of registrar/securityContext is to bridge those two domains

ghaskins
2016-06-20 18:40
the hosting tier lives in both domains

ghaskins
2016-06-20 18:44
@garisingh: accurate?

garisingh
2016-06-20 18:45
@ghaskins: looks good

ghaskins
2016-06-20 18:45
(and, as we both mentioned, is collapsed in the SDK model

garisingh
2016-06-20 18:45
did you have that picture or did you use one of your magic tools to whip it up real quick?

ghaskins
2016-06-20 18:45
i just whipped it up

ghaskins
2016-06-20 18:46
feel free to reuse

ghaskins
2016-06-20 18:47
i think what gets lost on people joining the project is that pretty much the entire rest-api is only meant to be used in that “trusted” box

ghaskins
2016-06-20 18:49
so, theres a documentation opportunity I suppose

chris-martin
2016-06-20 19:05
has joined #fabric

ghaskins
2016-06-20 19:27

ghaskins
2016-06-20 19:28
please update the perms accordingly…I think @ecblseg is already set up via grandfathering in pre-transfer @muralisr needs to be added

ecblseg
2016-06-20 19:28
has joined #fabric

ghaskins
2016-06-20 19:28
@ry: also, if any of the other maintainers (@binh, @sheehan @tamas ) would like to be added, I have no problem with that

ghaskins
2016-06-20 19:29
@binhn: ^^^

ghaskins
2016-06-20 19:38
@ry: oh i just meant if you could update the github perms

ghaskins
2016-06-20 19:39
Eric and Murali should be added to https://github.com/orgs/hyperledger/teams/fabric-chaintool-maintainers, and if Binh/Sheehan/Tamas request it

ghaskins
2016-06-20 19:39
(maybe I have perms to do it myself, not sure

ghaskins
2016-06-20 19:39
no, i dont seem to have an “add” button

ry
2016-06-20 19:39
hmm wait

ghaskins
2016-06-20 19:40
oh wait, i do have an “add person” entry box

ry
2016-06-20 19:40
yes, you’re a team maintainer (and were before today)

ghaskins
2016-06-20 19:40
though it looks like they have to be in the hyperledger org

ghaskins
2016-06-20 19:40
ok, sorry about that, i didnt realize

ghaskins
2016-06-20 19:40
i thought I lacked the perms

ghaskins
2016-06-20 19:40
ill take care of it

ry
2016-06-20 19:41
give me the github IDs and I’ll invite them to hyperledger

ghaskins
2016-06-20 19:41
ok

ghaskins
2016-06-20 19:41


thiruworkspace
2016-06-20 20:48
has joined #fabric

nick.dawson
2016-06-20 21:09
has joined #fabric

nick.dawson
2016-06-20 21:23
Hello, I was wondering if someone could clarify the present state of Transaction Confidentiality. The protocol document has the section: *4.7.2 Simplified transaction confidentiality* that states >Disclaimer: The current version of transaction confidentiality is minimal, and will be used as an intermediate step to reach a design that allows for fine grain (invocation) access control enforcement in the next versions. Is the _simplified transaction confidentiality_ model what is currently toggled in the core.yaml configuration file? @hossein @adc @kostas

binhn
2016-06-20 22:16
Announcing Hyperledger Fabric release v0.5-developer-preview https://github.com/hyperledger/fabric/wiki/Fabric-Releases

nick.dawson
2016-06-20 23:23
@adc: @hossein mentioned you might be able to provide clarification regarding the present state of transaction confidentiality

hossein
2016-06-20 23:23
has joined #fabric

buhrmi
2016-06-21 01:03
@simon: what's the alternative? using a CA?

buhrmi
2016-06-21 01:04
this entire exercise is to create something without a central authority ... so using a certificate authority goes against the core idea of an open block chain

adc
2016-06-21 07:13
@nick.dawson: what we have currently in the fabric is an hybrid between what is described in Section 4.7.2 and Section 4.3.2. In this hybrid, the symmetric chain key is replaced by an asymmetric key pair whose secret part is distributed to the validators at enrollment time. Therefore only validators can decrypt the transactions.

dr_tes
2016-06-21 15:06
has joined #fabric

tim.s
2016-06-21 15:32
has joined #fabric

ericmvaughn
2016-06-21 17:13
has joined #fabric

codascud
2016-06-21 19:13
@all Is there an example on how to use ibm-blockchain-js v1.0.0? https://github.com/IBM-Blockchain/ibm-blockchain-js have snippets.. quite helpful.. but am wondering if someone have a sample project?

nick.dawson
2016-06-21 21:28
CC: @kostas @adc: Thank you for the clarification. In this hybrid approach, is there a way to keep transactions confidential to a subset of the validating peers? For example, if I have three parties (Party A, Party B, and Party C) and all parties run validating peers, is there a way for Party A to transact with Party B without Party C being able to see the content of the transaction? As I understand it, in the hybrid approach, validators can decrypt all of the transactions, so Party A and Party B would not be able to initiate transactions without party C being able to decrypt them. The transactions in this case would be hidden from Users that are transacting through NVP, but the VP would have full visibility into the transactions. Is this correct?

cbf
2016-06-21 22:40
check out the # if you’d like to engage in discussion on a PR or grab a bag of popcorn :smile:

ryokawawork
2016-06-22 06:07
has joined #fabric

novoelementum
2016-06-22 14:45
has joined #fabric

castlesb
2016-06-22 15:11
has joined #fabric

castlesb
2016-06-22 15:24
Hey everybody, quick question. I am using Postman to communicate with the chaincode which works perfectly. The issue I just ran into and been trying to figure out is when I attempt to send an object in the args instead of multiple strings, such as in the cp chaincode example, I get this error: "data": "Error unmarshalling chaincode request payload: json: cannot unmarshal object into Go value of type string"

simon
2016-06-22 15:32
i don't think you are allowed to send an object?

castlesb
2016-06-22 15:35
For instance, "args":[ {"name":"test name", "address":"test address"} ]

castlesb
2016-06-22 15:36
instead of "args":[ "test name", "test address" ]

simon
2016-06-22 15:36
yes, i don't think that's supported

castlesb
2016-06-22 15:37
Gotcha, thanks for the response!

cbruguera
2016-06-22 15:59
I've seen the term "sub-chain" used in some parts of fabric documentation. Could someone give me some pointers on how does that actually work? Where can I read detailed info on subchains? How do multiple chains interact in a single hyperledger fabric network?

nits7sid
2016-06-22 16:04
Can I get the value of the state from NewChaincodeQuery() function?

aish
2016-06-22 16:09
has joined #fabric

sj
2016-06-22 17:59
has joined #fabric

tim.s
2016-06-22 19:26
I have successfully brought up the system on a Ubuntu 16.04 desktop and a Mac OSX laptop. By success I mean I can deploy the example02 chaincode and run invoke transactions and queries against the running docker vms. However when I deploy the system on a ubuntu laptop I can not successfully run the "make peer" command in vagrant. The error I get is: Sending build context to Docker daemon 16.97 MB Step 1 : FROM hyperledger/fabric-src:latest ---> 55ce58a24d43 Step 2 : COPY bin/* /usr/local/bin/ ---> Using cache ---> 40ab5fbd8849 Successfully built 40ab5fbd8849 CGO_CFLAGS=" " CGO_LDFLAGS="-lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy" GOBIN=/opt/gopath/src/github.com/hyperledger/fabric/build/bin go install http://github.com/hyperledger/fabric/peer # http://github.com/hyperledger/fabric/peer compile: reading input: EOF make: *** [build/bin/peer] Error 2

tim.s
2016-06-22 19:28
Anyone seen this and can suggest a solution? I have rebuilt the system - (deleted vagrant.d and the VirtualBox VMs) and reinstalled the vagrant and virtual box but still get the same error

brendan
2016-06-22 19:41
has joined #fabric

codascud
2016-06-22 19:41
@tim.s: can you try to do ]$ make peer from inside the fabric folder?

tim.s
2016-06-22 20:04
That is where I was $GOPATH/src/github.com/hyperledger/fabric when I was running the 'make peer'

ghaskins
2016-06-22 20:06
@tim.s: so IIUC you are trying to build outside of vagrant?

ghaskins
2016-06-22 20:07
oh wait, you said “in vagrant"

ghaskins
2016-06-22 20:07
nm

tim.s
2016-06-22 20:08
I noticed that in install.md it has the 'make peer' but in dev-setup.md it has 'make peer-image'

ghaskins
2016-06-22 20:09
they are different commands

ghaskins
2016-06-22 20:10
“make peer” builds the peer executable, peer-image builds the docker container that is intended to host a peer executable

tim.s
2016-06-22 20:10
yes - I got onto this path because in the ../fabric/build/bin there was no peer command

tim.s
2016-06-22 20:10
also I could not make membersrvc

ghaskins
2016-06-22 20:10
yes, “make peer” should generate ../fabric/build/bin/peer binary

ghaskins
2016-06-22 20:11
as a somewhat blind guess, i am wondering if you are having problems with the hostfs

ghaskins
2016-06-22 20:11
if you are in vagrant, the environment is largely normalized…but one thing that isnt is certain parts of the filesystem are punched through to your host

ghaskins
2016-06-22 20:12
(and this includes the $GOPATH)

ghaskins
2016-06-22 20:12
so, perhaps we are seeing some kind of problem with accessing the shared filesystem to ubuntu

tim.s
2016-06-22 20:12
that is a possibility. the laptop I am trying to do this on is a client laptop reprovisioned for ubuntu with only 58GB of disk. The others I successfully brought up are my own

codascud
2016-06-22 20:12
ah..

ghaskins
2016-06-22 20:12
i assume you have space at least

codascud
2016-06-22 20:13
do you have virtualization enabled?

codascud
2016-06-22 20:13
in your bios?

ghaskins
2016-06-22 20:13
(can you post the result of “df -a"

ghaskins
2016-06-22 20:13
@codascud: @tim.s wouldnt be able to vagrant up if he didnt

tim.s
2016-06-22 20:13
yes - df -h says I still have 52GB

ghaskins
2016-06-22 20:13
@tim.s ok

ghaskins
2016-06-22 20:14
@tim.s if you are willing to experiment

ghaskins
2016-06-22 20:14
can you try something for me

ghaskins
2016-06-22 20:14
?

tim.s
2016-06-22 20:14
be happy to - otherwise I am thinking of completely rebuilding the entire box

ghaskins
2016-06-22 20:15
if you look in df, there are 4 places that the vagrant image punches through to the host (/vagrant /local-dev /hyperledger and the $GOPATH)

ghaskins
2016-06-22 20:15
we want to see if we can build something that is NOT in one of those

tim.s
2016-06-22 20:16
ok

ghaskins
2016-06-22 20:16
i think /tmp qualifies, so lets do this there

ghaskins
2016-06-22 20:16
mkdir /tmp/go; export $GOPATH=/tmp/go

ghaskins
2016-06-22 20:16

nkunkel
2016-06-22 20:16
Is there a docker image for Hyperledger and it's dependencies for s390 RHEL 7.1?

ghaskins
2016-06-22 20:17
cd /tmp/go/src/github.com/hyperledger/fabric; make peer

ghaskins
2016-06-22 20:17
@nkunkel: i dont think prefabricated, but the base image for s390 RHEL $something is available and you can build the rest on it

ghaskins
2016-06-22 20:18
the only thing I am not sure on is the version of RHEL

ghaskins
2016-06-22 20:18
@vpaprots would know

tim.s
2016-06-22 20:18
can I find that with docker images?

ghaskins
2016-06-22 20:18
@tim.s find what? the s390 stuff?

tim.s
2016-06-22 20:19
yes

vpaprots
2016-06-22 20:19
Greg and I built the 390 baseimage on RHEL7.2...

nkunkel
2016-06-22 20:20
shoot =/

vpaprots
2016-06-22 20:20
haven't tried to see whats different about 7.1..

vpaprots
2016-06-22 20:20
have you run into some problem?

vpaprots
2016-06-22 20:20
(let me scroll back :slightly_smiling_face: heh )

tim.s
2016-06-22 20:20
copied the src to /tmp/go

nkunkel
2016-06-22 20:21
Nope, just trying to get set up. Been on a really old version of OBC for forever and thought this might be a good opportunity to switch to fabric.

nkunkel
2016-06-22 20:21
Maybe the 7.2 image works on 7.1?

vpaprots
2016-06-22 20:21
I would think it shouldnt be all that different

nkunkel
2016-06-22 20:22
Note to self: Even when youre unavailable on SameTime, Slack is fair-game

vpaprots
2016-06-22 20:22
the setupRHELonZ might be trying to install packages that are newer

vpaprots
2016-06-22 20:22
heh..

vpaprots
2016-06-22 20:22
hiding, trying to finish ECC...

tim.s
2016-06-22 20:24
@ghaskins - when running make peer in the tmp/go/src/ ... in fabric I get no docker in path

tim.s
2016-06-22 20:24
@ghaskins: So I must have missed a step

vpaprots
2016-06-22 20:24
on 390, you got to install docker yourself.. and it doesnt come part of the repo yet, unless you are on xenial


tim.s
2016-06-22 20:25
The laptop is 16.04

nkunkel
2016-06-22 20:26
yup I've seen that, already got docker installed

nkunkel
2016-06-22 20:27
Whats the link to the 7.2 Hyperledger docker image?

vpaprots
2016-06-22 20:27
try running `make behave`.. that should pull everything auto-magically

nkunkel
2016-06-22 20:28
dope, I'll try that

tim.s
2016-06-22 20:34
still get the same error

nkunkel
2016-06-22 22:31
yea running make clean peer at the end of the setupRHELonZ.sh script gives me "No Go in Path". Looks like it didn't install golang correctly

kanelai
2016-06-23 01:26
has joined #fabric

codascud
2016-06-23 01:45
@nkunkel: seems like the go gets installed in $HOME/go/bin after ruuning setupRHELonZ.sh script.. Can you try moving the go to /usr/local & then add " export PATH=$PATH:/usr/local/go/bin:${GOPATH//://bin:}/bin ” to ~/.profile

clessor
2016-06-23 14:15
has joined #fabric

ashnur
2016-06-23 14:33
so, if I wanted to try out fabric where should I start?

codascud
2016-06-23 14:35
@ashnur: Apart from the documentation on fabric… you can try Bluemix (it has a free account for 30 days)

ashnur
2016-06-23 14:35
I am looking at the docs

ashnur
2016-06-23 14:36
and I am confused

codascud
2016-06-23 14:37
looking for installation instructions or general information about fabric?

ashnur
2016-06-23 14:37
Ok, so more specifically, I would like to try to run an instance and try to write some chaincode and run it to see what it is possible with it

ashnur
2016-06-23 14:37
like do some POC or something

ashnur
2016-06-23 14:38
(i am not very specific, i just realized:( )

codascud
2016-06-23 14:40
well you can try chain code using Bluemix and follow instructions here https://github.com/IBM-Blockchain/learn-chaincode...

codascud
2016-06-23 14:41

ashnur
2016-06-23 14:42
sadly, I do have to run an own node and not use some third party service

ashnur
2016-06-23 14:42
however I think it is enough to just run a non-validating node

ashnur
2016-06-23 14:43
the problem for me right now is the sheer amount of docs. I just don't know where to look, there are too many places to look at. :smile:

codascud
2016-06-23 14:44
yeah you are right.. so if you want to do the installation then either (1) install using vagrant OR (2) install everything from scratch...



codascud
2016-06-23 14:44

ashnur
2016-06-23 14:45
ok, so the dev-setup is not just for fabric-devs?

codascud
2016-06-23 14:45
I am not sure of that...

ashnur
2016-06-23 14:45
:smile:

ashnur
2016-06-23 14:45
ok, thanks for the pointers :slightly_smiling_face:

ghaskins
2016-06-23 14:46
@ashnur: if you want to do any dev, including chaincode, the devenv is a good way to start

ghaskins
2016-06-23 14:46
but that is good feedback for the doc, we should make that more clear

ghaskins
2016-06-23 14:47
in its simplest form, you just need a system with virtualbox+vagrant, check out the tree, cd to devenv, and do “vagrant up"

ashnur
2016-06-23 14:47
ghaskins: I think it would be nice to just have a list of links on the beginning of the project readme: if you want just this: read that, if you want to develop this, read that.. etc

ashnur
2016-06-23 14:47
i know vagrant at least :smile:

ashnur
2016-06-23 14:48
(and i hate it too, but i think all devops tools are terrible)

ghaskins
2016-06-23 14:48
(theres a small amount of peripheral requirement too, like for instance you need an os/bios with HVM/VMX enabled to run the virtualbox-based vagrant

ashnur
2016-06-23 14:48
yeah, i know :smile:

ghaskins
2016-06-23 14:48
but, if you manage to get vagrant up to complete without errors, then “vagrant ssh” and you should have everything you need to run fabric and develop chaincode

ashnur
2016-06-23 14:49
thank you, that is encouraging :smile:

ghaskins
2016-06-23 14:49
heh, sorry, i didnt mean to emphasis the “if you manage"

ghaskins
2016-06-23 14:49
its pretty reliable

ashnur
2016-06-23 14:49
i set up vagrant more than a dozen different times for different purposes before, but never ever without seriously annoying issues :slightly_smiling_face:

ashnur
2016-06-23 14:50
yeah, after it is configured, it usually just runs fine, that is nice

ghaskins
2016-06-23 14:50
the biggest problem we seem to run into is people within China sometimes cannot access some of the docker repositories that the vagrant provisioner tries to access

ashnur
2016-06-23 15:03
I am from europe so probably will not be an issue :slightly_smiling_face:

codascud
2016-06-23 18:31
“For development (try & test)purpose only”, can I delete/remove a contract that is already mined?

codascud
2016-06-23 19:18
Any one has link to the API documentation for shim?

codascud
2016-06-23 19:30
@ghaskins: any pointers ^ would be very helpful...

ghaskins
2016-06-23 19:32
@codascud: not sure there is a doc, I just looked at the code

ghaskins
2016-06-23 19:33
(there very well could be a doc, im not sure)

ghaskins
2016-06-23 19:33
regarding delete/remove, full lifecycle management (upgrade+terminate) is being worked on but not available yet

codascud
2016-06-23 19:39
Thanks a lot ghaskins !


codascud
2016-06-23 20:36
In the REST call what does the “id” mean? { "jsonrpc": "2.0", "method": "query", "params": { "type": 1, "chaincodeID":{ "name": <address> }, "ctorMsg": { "function":"query", "args":["a"] } }, "id": 5 ---> What is id here? }

sheehan
2016-06-23 20:38
part of the JSON RPC spec http://json-rpc.org/wiki/specification

sheehan
2016-06-23 20:38
"The request id. This can be of any type. It is used to match the response with the request that it is replying to."

codascud
2016-06-23 20:40
So does this mean that if two request is sent to server with id as “5" then there will be an error?

sheehan
2016-06-23 20:42
no, you can use the same ID for every request if you want

codascud
2016-06-23 20:43
hmmm…thanks @sheehan

sheehan
2016-06-23 20:48
One reason you may use it is for batch requests http://www.jsonrpc.org/specification#batch but I’m not sure if the Fabric JSON-RPC API supports batching

sheehan
2016-06-23 20:49
@anya: Are batch requests supported by the JSON RPC API? ^^^

anya
2016-06-23 21:01
not at this time.

cbruguera
2016-06-23 23:25
Is there anyone around to give me some pointers regarding "sub-chains"? I've seen the term used in the docs a couple of times, but I'm not quite sure what does it actually mean.

dayu
2016-06-24 01:31
has joined #fabric

nkunkel
2016-06-24 02:27
What is the next step to set up my dev environment for running fabric? I just used this script (https://github.com/hyperledger/fabric/blob/master/devenv/setupRHELonZ.sh) Do I now just need to make a bash script to start a validating peer node and I'm done?

codascud
2016-06-24 02:29
@nkunkel: have you compiled peer?

codascud
2016-06-24 02:30
if you are installing fabric without vagrant then go to fabric/ folder and type in make peer

codascud
2016-06-24 02:30
if oyu need CA, then also do a make membersrv

codascud
2016-06-24 02:32
and if you need REST enabled, then go to core/rest]$ and start http server with this command: sudo http-server -a 0.0.0.0 -p 5554 --cors

nkunkel
2016-06-24 02:34
Is there a scenario where one would not need REST enabled. How else is the chaincode invoked or queried?

codascud
2016-06-24 02:34
yes.. you can use CLI to do all chaincode operations..

codascud
2016-06-24 02:35
REST is optional...


nkunkel
2016-06-24 02:36
Interesting, thank you (fabric newbie)

codascud
2016-06-24 02:37
sure… do execute the test cases after you compile peer… can be done by ]$ make unit-test …

nkunkel
2016-06-24 03:10
so after starting the peer, and enabling rest I just deploy the chaincode and I'm good to go?

ashnur
2016-06-24 07:47
what is the difference between the master branch and the v0.5?

cbf
2016-06-24 08:07
@ashnur: master is continuing development, 0.5-developer-preview is a release we are stablizing/hardening simultaneously.

ashnur
2016-06-24 08:08
So I guess I should be trying out the dev-preview then

cbf
2016-06-24 08:10
yes, please :grinning:

ashnur
2016-06-24 09:22
well, setting up vagrant went surprisingly smooth

ashnur
2016-06-24 09:22
i mean, i am inside the running box now, after vagrant ssh :slightly_smiling_face:

ashnur
2016-06-24 10:16
i spoke too soon. :disappointed:

ashnur
2016-06-24 11:07
I remember seeing some kind of mentions of public meetings here?

codascud
2016-06-24 12:25
@nkunkel: yes… Then if you want, you can configure some options available in core.yaml file

codascud
2016-06-24 14:58
Any idea How are the users defined in membersrv/membersrvc.yaml replicated to all the peers in the network?

garisingh
2016-06-24 15:54
@codascud: users are not replicated. Authentication / authorization of users at the peer level is handled via digital signatures. Peers initially connect to membership services and download their relevant enrollment material (their certificates, encryption keys and root certificate for the ECA/TCA). Client / users would also initially connect to membership services and get their enrollment material as well. They then use their enrollment key to receive transaction certificates which they use to sign transactions and submit to peers

garisingh
2016-06-24 15:55
Now perhaps you were talking about what happens when using the REST interface and the story there is a bit different because in that case the peer which you initially "log on" to via the /registrar endpoint effectively becomes the "client" for you and has your enrollment material which means that you can only invoke transactions via REST on that peer with any single ID

garisingh
2016-06-24 15:57
https://github.com/hyperledger/fabric/blob/master/sdk/node/README.md does a pretty good job of showing how this works using the new NodeJS SDK which uses the native gRPC API directly rather than using the REST endpoints

codascud
2016-06-24 16:27
@garisingh: Thank so much for the info! reading about it...

eugenn
2016-06-25 10:56
has joined #fabric

chris
2016-06-25 19:48
has joined #fabric

adrian_cortez
2016-06-25 21:35
has joined #fabric

joequant
2016-06-26 10:34
Question. I'm getting a panic because my config file doesn't have a variable peer.discovery.touchPeriod. What is the correct fix. Put in a default or abort with a better error message?

joequant
2016-06-26 10:34
It's in line 522 of peer.go

kostas
2016-06-26 11:02
Look into the default value in the repo and use that maybe. IIRC it is 6 seconds.

nick.dawson
2016-06-27 03:30
Anyone know how to resolve the "Error: sql: no rows in result set” error from the node SDK? ``` hlc already enrolled +12ms registered and enrolled.. making deploy request hlc Member.deploy +2ms hlc TransactionContext.deploy +0ms hlc Received deploy request: {"chaincodeName":"mycc","fcn":"init","args":[“100”,"200”,"1"]} +0ms hlc [TransactionContext] No TCert cached. Retrieving one. +0ms hlc Member.getNextTCert: key=null +0ms hlc Member.getNextTCert: key=null, creating new getter +0ms hlc shouldGetTCerts: yes, we have no tcerts +1ms hlc Failed getting a new TCert [Error: sql: no rows in result set] +70ms error on invoke: {"error":{"code":2,"metadata":{"_internal_repr":{}}},"msg":"Error: sql: no rows in result set”} ```

nick.dawson
2016-06-27 03:35
(the deploy works from inside vagrant using the cli) ``` ./peer chaincode deploy -n mycc -c '{"Function":"init", "Args": [“100”,”200”,”1" ]}’```

nick.dawson
2016-06-27 03:39
All i can find in the issues is a request to add it to the Troubleshooting guide https://github.com/hyperledger/fabric/issues/1835#issuecomment-226236301

garisingh
2016-06-27 09:07
@nick.dawson: that error generally occurs if the user does not exist in membership services or potentially you were using an older version of membership services at some point and it is pointing at a database with an older structure.


cbf
2016-06-27 12:49
if you could all help promote our images on DockerHub, that would be awesome… give our images a star



mgarciap
2016-06-27 14:07
Hi @cbf, the images don’t have any description, source repository reference, etc. It will really help for this purpose

cbf
2016-06-27 14:11
yes, agree. I made that comment on the # channel earlier, thanks

codascud
2016-06-27 21:05
Call to /registrar gives the following error: { "Error": "rpc error: code = 2 desc = 'Identity lookup error: sql: no rows in result set'" } Payload: { "enrollId": "broker", "enrollSecret": "password" } How do I create a new client named broker? Do I have to edit membersrvc.yaml file? Thanks..

codascud
2016-06-27 21:13
@garisingh @cbf any suggestionss will be helpful

jeffprestes
2016-06-27 21:29
has joined #fabric

codascud
2016-06-27 22:57
How can I add mode users with registrar role? I have a network of 3 peers and one CA

cbf
2016-06-27 23:06
@codascud: membersrvc is not my area of expertise… sorry… @garisingh more likely has insights for that

codascud
2016-06-27 23:07
thanks for the reply! Will keep trying...

garisingh
2016-06-27 23:09
The /registrar endpoint is actually used for logging in existing users. Simplest option is to add the user in the membersrvc.yaml file

codascud
2016-06-27 23:09
Got a dummy registrar working.. Had to add the (1) user in membersrvc.yaml and ALSO under (2) attributes: # attribute-entry-0: diego;institution_a;company;ACompany;2015-01-01T00:00:00-03:00;; attribute-entry-0: broker;institution_a;company;ACompany;2015-01-01T00:00:00-03:00;;

codascud
2016-06-27 23:10
Is that the correct way @garisingh ?

garisingh
2016-06-27 23:10
Assuming you are on the latest version of the fabric, you can now also use the NodeJS SDK to create new users rather than adding them directly to the YAML file

codascud
2016-06-27 23:11
got it… have not tried the SDK yet.. will do it soon.. Thanks @garisingh @cbf!!

codascud
2016-06-27 23:12
Initially I was just adding user under the “Users:” tag… seems like we also need to write it under “attributes” secion aswell...

garisingh
2016-06-27 23:13
I will need to doublecheck on that but if that works for you now it does not hurt anything

codascud
2016-06-27 23:13
yup true :-}

codascud
2016-06-28 00:04
There seems to be a bug (or may be i am getting it wrong):

codascud
2016-06-28 00:04
Once I call /registrar API and successfully register a user Req: { "enrollId": "jim", "enrollSecret": "6avZQLwcUe9b" } Res: { "OK": "User buyside is already logged in." } Then the second time the API return OK even with WRONG password:- Req: { "enrollId": "jim", "enrollSecret": "wrong Password" } Res: { "OK": "User buyside is already logged in." }

codascud
2016-06-28 00:05
is it expected?

garisingh
2016-06-28 00:50
Sadly yes

garisingh
2016-06-28 00:51
You only need to and can log in once

garisingh
2016-06-28 00:53
After that, when you issue invoke calls you will put the enroIlID in the secureContext field and behind the scenes the peer acts like a wallet for you

codascud
2016-06-28 01:15
Thanks @garisingh..

hangliu
2016-06-28 02:37
has joined #fabric

ibmamnt
2016-06-28 04:29
@codacus, I was able to write a code to register user via SDK. I reused the sample code under SDK.

ashnur
2016-06-28 09:06
trying out fabric, and I started the first validating node with noops and without security enabled. then i deploy the 02 example from a different ssh prompt, seems to work fine, the validating (in its name at least) node outputs: `08:54:09.091 [container] WriteGopathSrc -> INFO 018 rootDirectory = /opt/gopath/src` (and nothing else). Then I write `peer node status` in the same prompt from where I deployed the example, and it outputs : https://gist.githubusercontent.com/ashnur/777f6256f71b9290df9debd178897cba/raw/219042dc0096723b600f2f47838cc27a196f3dd1/peernodestatus

ashnur
2016-06-28 09:06
I suspect I got lost somewhere, but I don't know why it says connection refused

garisingh
2016-06-28 13:05
@ashnur - are you running the peer node in a Docker container?

ashnur
2016-06-28 13:06
@garisingh: i am running the dev env

garisingh
2016-06-28 13:06
in Vagrant? (sorry - been a while since I looked at those docs - I run everything native)

garisingh
2016-06-28 13:07
try setting the environment variable CORE_PEER_ADDRESSAUTODETECT=true

ashnur
2016-06-28 13:07
yes, windows 10 host, virtualbox & vagrant on an ubuntu box on which Docker is running

ashnur
2016-06-28 13:08
will try but since then i tried out bunch of other stuff not sure if i can still reproduce it exactly

garisingh
2016-06-28 13:09
else the peer reads the value out of core.yaml (and the default value is 0.0.0.0:30303 in the core.yaml)

codascud
2016-06-28 13:25
Where does the “fmt.Println()” statements written in CC get printed by default? I have peer running in debug mode but still don`t see the fmt.Println() stmts.. CC works fine… I can get and put values from CLI...

simon
2016-06-28 13:27
they should go to stdout

codascud
2016-06-28 13:27
stdout of peer?

simon
2016-06-28 13:28
no, of chaincode

ghaskins
2016-06-28 13:29
I think (unless something has changed) that if you do a standard deployment, the cc stdout is not externally accessible

codascud
2016-06-28 13:30
hmmmm… so I have peer & membersrvc running.. I dont see o/p on them.. Where is the chaincode stdout?

ghaskins
2016-06-28 13:30
if you use devmode, it just hits the terminal in which you launched the cc in devmode

codascud
2016-06-28 13:31
ah..got it..thanks… And is there a CC log configuration?

ghaskins
2016-06-28 13:31
not sure, there needs to be if there isnt one

ghaskins
2016-06-28 13:32
its not been a painpoint for me because I am still in the phase of exclusively using devmode

ghaskins
2016-06-28 13:32
I would search the issues, and, if none found, create one

ghaskins
2016-06-28 13:33
I would like to see that feature too, at least for dev

garisingh
2016-06-28 13:35
@ashnur: any luck?

codascud
2016-06-28 13:35
yeah.. looking into it

ashnur
2016-06-28 13:36
@garisingh: didn't change much and I have to finish something before I can get back to that issue :slightly_smiling_face: but thanks and I will follow up after I am done

codascud
2016-06-28 13:38
@garisingh: the dev mode is enabled in core.yaml (mode:dev), am I correct?

muralisr
2016-06-28 13:43
@codascud: I’d use ./peer node start —peer-chaincodedev mode which does all the right things for dev mode

muralisr
2016-06-28 13:43
including set chaincode.mode to dev

codascud
2016-06-28 13:44
got it..trying it now…thanks..

muralisr
2016-06-28 13:45
sure thing

ashnur
2016-06-28 14:23
@muralisr: can you tell me perhaps what `peer node status` does?

ashnur
2016-06-28 14:32
so, this marbles demo is really nice and all, but i am already seeing cracks :slightly_smiling_face:

muralisr
2016-06-28 14:38
@ashnur status just reports “up” currently.

ashnur
2016-06-28 14:40
for me the default ip was not good enough so it couldn't connect

ashnur
2016-06-28 14:40
will try again though

codascud
2016-06-28 14:45
@muralisr: i can see the debug messages on CC .. thanks.. However, after successful deployment of CC I can`t query it… Error:Failed to launch chaincode spec(Failed to init chaincode(handler not found for chaincode sample))….

codascud
2016-06-28 14:45
any idea what could be going wrong here?

muralisr
2016-06-28 14:46
@codascud: seems likely the name used in the CC is not the name used in the query ?

muralisr
2016-06-28 14:47
can you paste the chaincode startup command , peer start up command and the query command please

muralisr
2016-06-28 14:47
CORE_CHAINCODE_ID_NAME=mycc

muralisr
2016-06-28 14:47
then “-n mycc” should be used in the query

muralisr
2016-06-28 14:48
(assuming you are running with —peer-chaincodedev)

codascud
2016-06-28 14:48
yes… sure…

codascud
2016-06-28 14:58
@muralisr: I am using REST to deploy it… below are the Req & Res….

codascud
2016-06-28 14:59
*Deploy Req* { "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID":{ "path":"path to contract", "name":"sample" }, "ctorMsg": { "function":"init", "args":["coda"] } }, "id": 1 } *Deploy Res* { "jsonrpc": "2.0", "result": { "status": "OK", "message": "sample" }, "id": 1 } *Query Req* { "jsonrpc": "2.0", "method": "query", "params": { "type": 1, "chaincodeID": { "name": "sample" }, "ctorMsg": { "function": "read", "args": [ "hello_world" ] } }, "id": 2 *Query Res* { "jsonrpc": "2.0", "error": { "code": -32003, "message": "Query failure", "data": "Error when querying chaincode: Error:Failed to launch chaincode spec(Failed to init chaincode(handler not found for chaincode sample))" }, "id": 2 }


muralisr
2016-06-28 15:00
I assume you are running peer with —peer-chaincodedev ?

codascud
2016-06-28 15:00
yes

muralisr
2016-06-28 15:01
can you paste the chaincode command ?

codascud
2016-06-28 15:02
hmmm.. the CLI command?

muralisr
2016-06-28 15:03
so in dev mode, the user runs the chaincode

muralisr
2016-06-28 15:03
as opposed to the peer “starting” it

codascud
2016-06-28 15:07
ohk.. there seems to be an issue with the handle (contract address?) Can you help me with the CLI command that I can execute to run the query->read() in cc

codascud
2016-06-28 15:07
]$ ./peer chaincode query -l golang -n sample -c '{"Function": "query", "Args": ["coda"]}'

muralisr
2016-06-28 15:12
sure

codascud
2016-06-28 15:13
Gives o/p Error: Error querying chaincode: rpc error: code = 2 desc = "Error:Failed to launch chaincode spec(Failed to init chaincode(handler not found for chaincode sample))"

codascud
2016-06-28 15:13
peer command: ./peer node start --peer-chaincodedev --logging-level=debug

muralisr
2016-06-28 15:14
this is what I do

muralisr
2016-06-28 15:14
cd <mychaincode dir>

muralisr
2016-06-28 15:14
go build

muralisr
2016-06-28 15:15
CORE_CHAINCODE_ID_NAME=sample CORE_PEER_ADDRESS=127.0.0.1:30303 ./mychaincode

muralisr
2016-06-28 15:15
make sure logs on both peer and chaincode look healthy

muralisr
2016-06-28 15:16
do deploy (still have to do the “deploy” for doing the “init” part of the deploy)

muralisr
2016-06-28 15:16
and then invoke, query etc


codascud
2016-06-28 15:17
giving it a try… will share results shortly...

muralisr
2016-06-28 15:17
sure

codascud
2016-06-28 15:25
ah! it workes!! thanks!!! @muralisr

muralisr
2016-06-28 15:26
anytime, @codascud

jzhang
2016-06-28 15:30
@muralisr: do I understand it right that chaincode has to be either available in the peer’s local file system or https://github.com? I’ve tried both and both worked fine, but the same chaincode pushed to an enterprise github within my company’s firewall (with an url like https://github.ibm.com) I could not get it to deploy successfully

ghaskins
2016-06-28 15:37
jzhang: one thing to understand is that a ton of the system was designed with the assumption that an NVP is part of “the client”….so the right way to think about it is the it has to be available to the _clients_ local filesystem, not necessarily “a peer” per se

ghaskins
2016-06-28 15:37
this becomes more apparent when you use the SDK, which collapses “the client” + NVP into one process

jzhang
2016-06-28 15:37
fair point Greg, for my specific case I’m using REST APIs to deploy

ghaskins
2016-06-28 15:38
this process then packages up the chaincode for a peer-digestable transaction and is carried around in payload

ghaskins
2016-06-28 15:38
yeah, the REST api is really a way for a client to extend into the NVP

ghaskins
2016-06-28 15:38
once I understood that point, things made a lot more sense

ghaskins
2016-06-28 15:39
things feel more natural (to me) when using the SDK

jzhang
2016-06-28 15:40
thing is though, REST APIs are the easiest way to deploy chaincode during development

ghaskins
2016-06-28 15:40
understood, and theres nothing wrong with continuing to do that (at least while the REST api is not deprecated)

ghaskins
2016-06-28 15:41
just understanding that the thing you are talking to is considered part of your client makes it easier to understand what is happening

jzhang
2016-06-28 15:41
i haven’t tried the SDK, does it work headlessly? or would i have to write a wrapper node app to use it?

jzhang
2016-06-28 15:41
yes Greg, that’s a very good point

ghaskins
2016-06-28 15:41
im not sure what you mean “headlessly”….its a nodejs based SDK so presumably you would need a nodejs application to drive it

ghaskins
2016-06-28 15:42
but, it doesnt require an NVP, so in that sense its “backendless” at least, heh

jzhang
2016-06-28 15:42
(my next question was going to be when would the REST API start supporting a zip upload, but now with what you said above it’s a moot point)

ghaskins
2016-06-28 15:42
yeah, the “zip upload” is what comes out the other side (of the NVP and/or SDK)

ghaskins
2016-06-28 15:43
the payload is not signed, is not a deploy txn, etc, until it hits that processing layer

ghaskins
2016-06-28 15:43
it “feels” like it is because of the way the REST api presents it, but its not fully baked

jzhang
2016-06-28 15:43
i know there’s a node package that i can use with require() in my node wrapper, i know how to do that. I was wondering if there’s a headless package that I can use to something like “node sdk.js —file-upload —file /some/path/to/chaincode"

jzhang
2016-06-28 15:44
sounds like the answer is no

jzhang
2016-06-28 15:44
but it would be a useful tool to have during chaincode development

ghaskins
2016-06-28 15:44
oh i see, i think the answer is no but I also think that wouldnt be hard to come up with

jzhang
2016-06-28 15:44
yep

ghaskins
2016-06-28 15:44
I have been thinking about similar for chaintool clients

ghaskins
2016-06-28 15:44
which are a superset of that

codascud
2016-06-28 15:47
May be this one pointing to your network:


codascud
2016-06-28 15:47
@jzhang:

jzhang
2016-06-28 15:53
thanks for the pointer @codascud , looks interesting, although it still doesn’t help in my case since it still requires the code to be pushed to a http://github.com repo (a requirement per the Bluemix-based blockchain service).

jzhang
2016-06-28 15:54
to me if i need to keep my chaincode private it looks like I’d have to resort to using the SDK

ghaskins
2016-06-28 15:55
(or at least understand you need a privately controlled NVP ;)

ghaskins
2016-06-28 15:55
though I think the SDK is the way to go

jzhang
2016-06-28 15:58
is there doc on setting up a NVP? I’ve heard on and off that NVPs are to be removed from the architecture, and also does the v2.0 architecture still have an NVP equivalent?

jzhang
2016-06-28 15:59
note that the NVP would have to be a native process (as opposed to a docker instance) since the chain code is constantly changing during development

ghaskins
2016-06-28 16:33
yes to doc, and yes, I think they might be going away, or at least away in this particular capacity

ghaskins
2016-06-28 16:33
also note that docker vs native process shouldnt matter much, architecturally

ghaskins
2016-06-28 16:34
you could always launch the NVP with a volume mount if for some reason it made sense to your workflow to have an NVP in a container

ghaskins
2016-06-28 16:34
that said, it probably doesnt

jzhang
2016-06-28 16:39
scratch what I said above re: native process, you are right i could mount a volume when launching the container to point to the chaincode folder

codascud
2016-06-28 16:44
I am getting an error on “go build ./“ while creating my function that gets called by Query(),.. The error is: Error: t.myReadFn undefined (type *SimpleChaincode has no field or method myReadFn) Any pointers how to fix it?

garisingh
2016-06-28 17:17
@codascud: would have to look at your actual chaincode. Likely you can fix the error by just removing the `t.` from `t.myReadFn` or making sure that `myReadFn` is attached to the SimpleChaincode struct

tim.s
2016-06-29 13:07
fmt.Printf within chaincode question. When I deploy and invoke chaincode to several peers the fmt statements do not generate any output to the terminal screens. As a test I was deploying example02 which contans fmt statements. Is there a way of getting the output of the fmt methods?

codascud
2016-06-29 13:20
@tim.s: I was facing the same issue yesterday.. Here is how you can see the print statements…

codascud
2016-06-29 13:21
(1) build your code by myCCdir]$ go build ./

codascud
2016-06-29 13:21
(2) CORE_CHAINCODE_ID_NAME=<any handle> CORE_PEER_ADDRESS=127.0.0.1:30303 ./myCCdir

codascud
2016-06-29 13:22
you can now see all your printf statemets on this soncole..

codascud
2016-06-29 13:22
*console

tim.s
2016-06-29 13:22
thanks - will let you know

tim.s
2016-06-29 13:26
@codascud: First problem encountered is that the build does not pull in http://github.com/op/go-logging - so I get build errors. Sorry I am a newbie with golang

codascud
2016-06-29 13:48
@tim.s: you can use a very simple example in the begining and build from that. Here is a very simple example:


codascud
2016-06-29 13:50
start/chaincode_start.go — I would suggest (I did it this way myself) compile this CC and add print statements to see o/p on console.. then move to finished/chaincode_finished.go….

tim.s
2016-06-29 16:54
@codascud: Thanks. I was able to get stdout printf to the console when I started a single peer using the sandboxsetup.md instructions. However

tim.s
2016-06-29 16:56
when I use the peer startup from the devnet-setup.md I do not get the stdout.

tim.s
2016-06-29 16:57
The difference is that using devnet-setup.md lets you start multiple connected peers whereas the sandbox-setup.md peer startup only allows a single peer node. At least I have not been able to connect a second one.

nkunkel
2016-06-29 21:06
I have a question involving chaincode functions. I know the standard Init, Invoke, and Query can be called by doing something like peer chaincode invoke -p ...... or peer chaincode query -p....

nkunkel
2016-06-29 21:07
What about other functions you defined. Like say I had a function approve.

yanglei
2016-06-29 21:07
has joined #fabric

nkunkel
2016-06-29 21:07
Would I have a chaincode approve -p...

nkunkel
2016-06-29 21:08
or would it just stay as invoke, and just the Function parameter I pass to -c be approve?

muralisr
2016-06-29 21:09
@nkunkel the later

nkunkel
2016-06-29 21:10
Okay that's what I thought, thank you

muralisr
2016-06-29 21:10
sure thing

nkunkel
2016-06-29 22:17
Having an issue, and wondering if it's a bug in fabric, or something I'm doing wrong on my end. In my chaincode, apart from the standard Init, Invoke, and Query functions I have a few extra ones I have put in, for example one called Approve. I can invoke my Init/Invoke/Query using peer chaincode deploy/invoke/query -p $CPATH -n $NAME -c '{"Function":"Init/Invoke/Query", "Args": ["egg"]}'

nkunkel
2016-06-29 22:18
Now if I want to trigger my approve function I do: peer chaincode invoke -p $CPATH -n $NAME -c '{"Function":"Approve", "Args": ["egg"]}' However that doesn't work. It doesn't call my Approve function, it calls my Invoke function.

tim.s
2016-06-30 00:27
@nkunkel: Look at the AssetManagement chaincode in the examples. It shows how to manage the addition function invocations from the Invoke function

nkunkel
2016-06-30 00:31
Oh wow, okay so the invoke just becomes a handler for all function calls that arent init or query?

ghaskins
2016-06-30 00:47
@nkunkel: FWIW, the chaintool project provides what you are looking for to a degree by managing the dispatch table for you



ghaskins
2016-06-30 00:49
feel free to ask me any questions about it, I would love the feedback

thetradinghall
2016-06-30 08:02
has joined #fabric

justin.white
2016-06-30 18:47
has joined #fabric

moulsonp
2016-06-30 20:58
has joined #fabric

nkunkel
2016-07-01 02:34
@codascud: Can you clarify the method you were describing to display printf statements in the console? CORE_CHAINCODE_ID_NAME=<any handle> CORE_PEER_ADDRESS=127.0.0.1:30303 ./myCCdir Does this mean I preface my chaincode deploys with CORE_CHAINCODE_ID_NAME=myhandle or does it have to be each individual invoke and query as well in order to see their corresponding printf statements? So for example would this be correct? CORE_CHAINCODE_ID_NAME=chaincode CORE_PEER_ADDRESS=0.0.0.0:30303 peer chaincode deploy -p http://github.com/hyperledger/fabric/chaincode/bank -c '{"function":"Init", "args":["name":"owner1", "balance":"1000"]}'

nits7sid
2016-07-01 02:57
I am trying to set up a network of 4VP , 1NVP using dockers and a CA as an executable with security is enabled and privacy is disabled..I noticed that after I deploy the chaincode and call invoke functions I could retrieve the block height and transactions front the VPs, but in case of NVP it says no blockchain found...isn't the NVP also holds the copy of the shared ledger?

cbluck
2016-07-01 06:12
has joined #fabric

nick.dawson
2016-07-01 16:44
I am testing out the hyperledger/fabric-peer and hyperledger/fabric-membersrvc docker containers and when i try and deploy chaincode, the transaction results are: ``` "transactionResults": [ { "error": "Error starting container: cannot connect to Docker endpoint", "errorCode": 1, "uuid": "2bc507ae-5adf-4ac7-ba9f-abc367ce6887" } ] ``` This stack overflow article recommended mounting the docker socket into the docker container… http://stackoverflow.com/questions/37573410/failed-to-launch-chaincode-specerror-starting-container-cannot-connect-to-dock I tried mounting `-v /var/run/docker.sock:/var/run/docker.sock ` and it didnt resolve the issue. this is my docker-compose files: *compose-defaults.yml* ``` vp: image: hyperledger/fabric-peer environment: - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=http://127.0.0.1:2375 - CORE_LOGGING_LEVEL=DEBUG # Startup of peer must be delayed to allow membersrvc to come up first command: sh -c "sleep 5; peer node start" #command: peer node start # Use these options if coverage desired for peers #image: hyperledger/fabric-peer-coverage #command: ./peer.test --test.coverprofile=coverage.cov node start membersrvc: image: hyperledger/fabric-membersrvc command: membersrvc ``` *docker-compose.yml* ``` vp0: extends: file: compose-defaults.yml service: vp ports: - "5000:5000" - "30303:30303" environment: - CORE_PEER_ID=vp0 volumes: - /var/run/docker.sock:/var/run/docker.sock membersrvc: extends: file: compose-defaults.yml service: membersrvc ports: - "50051:50051" environment: - CORE_LOGGING_LEVEL=DEBUG ``` *Not sure if I am missing something, but as i understand it, the VPs run the chaincode in docker containers. I am running a VP as a docker container (vp0). Is vp0 trying to spawn its own docker container to execute the chaincode?*

tuand
2016-07-01 17:33
the peer does run the chaincode inside a docker container. For docker-compose config examples, take a look at the files in hyperledger/fabric/bddtests

nick.dawson
2016-07-01 17:34
so it is running a docker container inside of a docker container?

tuand
2016-07-01 17:35
yes

tuand
2016-07-01 17:35
do an `ip ad` and see what docker0 is set to ? you might need to change your core_vm_endpoint

nick.dawson
2016-07-01 17:38
I am running docker for mac Beta, based off of @cbf’s blog post https://developer.ibm.com/opentech/2016/06/27/running-hyperledger-fabric-natively-on-mac/

tuand
2016-07-01 17:40
ah, I haven't tried cbf's write-up yet , I mostly run in x86/win/vagrant

cbf
2016-07-01 17:41
hmmm

cbf
2016-07-01 17:42
don't have my laptop with me but I don't recall a problem deploying chaincode

nick.dawson
2016-07-01 17:46
i was using the node SDK, and it took me awhile to figure out what the error was, since the transactions in the SDK don’t return the results yet. they just return `"result":"TODO: get actual results; waited 20 seconds and assumed deploy was successful”`

gromeroar
2016-07-01 20:07
has joined #fabric

sunsay00
2016-07-01 21:18
has joined #fabric

nkunkel
2016-07-01 21:58
Can I get someone to help me through DM? I have a few questions concerning REST calls to the chaincode.

adaml
2016-07-04 03:17
has joined #fabric

ashnur
2016-07-04 11:56
what is the relationship between ibm-blockchain-js and the fabric node sdk?

cbf
2016-07-04 12:43
the ibm one inspired the hyperledger version

cbf
2016-07-04 12:44
the ibm one is slightly dated now

ashnur
2016-07-04 12:44
I see, because i was trying out the marbles demo, and i was not sure how much of what I saw there applies to the node sdk

ashnur
2016-07-04 12:45
but given what you said, I think I should just start from scratch

tim.blankers
2016-07-04 13:41
@nick.dawson: try setting CORE_VM_ENDPOINT=unix:///var/run/docker.sock

nick.dawson
2016-07-04 16:15
@tim.blankers: thank you, it worked! The peer has communication with the docker daemon now

nick.dawson
2016-07-04 17:19
Instead of the "Error starting container: cannot connect to Docker endpoint”, I now get the following error: ``` {"transactionResults": [ { "error": "Error starting container: Tag latest not found in repository http://docker.io/hyperledger/fabric-baseimage", "errorCode": 1, "uuid": "9333f022-e2f5-42da-b42c-088e420749d5" } ] } ``` To try and fix this i built the base image and tagged it as latest ``` $ cd $FABRIC/images/base && make docker > ... > Successfully built 7d600d503e09 $ docker tag 7d600d503e09 hyperledger/fabric-baseimage:latest $ docker images REPOSITORY TAG IMAGE ID CREATED SIZE hyperledger/fabric-baseimage latest 7d600d503e09 19 minutes ago 1.061 GB hyperledger/fabric-baseimage x86_64-0.0.10 7d600d503e09 19 minutes ago 1.061 GB ``` It doesnt give me that error anymore, Now i get this error... ``` {"transactionResults": [ { "error": "Error starting container: cannot normalise nothing", "errorCode": 1, "uuid": "a2253f1e-ffbe-4bb1-8f8c-d4c001cef572" } ] } ``` Any ideas on what could be going on? Did tagging it myself actually _fix_ anything or is there something else going on? *update*: looks like the “cannot normalise nothing” error might be a docker for mac bug. googling “cannot normalise nothing” only comes up with one result: https://forums.docker.com/t/problems-with-new-beta-release-1-12-0-rc2-beta16-build-9493/16731

thomas.leplus
2016-07-05 00:38
has joined #fabric

karthik
2016-07-05 04:27
Is it possible for a given VP to have the data within its premises(only to that VP), but not to other VPs? I am visioning like each VP has some data(not everything) to itself, not sharing with other VPs/network.

shubhamvrkr
2016-07-05 06:33
is it possible to get the block number which contains one particular transaction?or do i have to scan all the blocks to find that particular transaction

nick.dawson
2016-07-05 07:35
@karthik: VPs validate the hash of the world state, which contains all of the Chaincodes. if two VPs cant see the same state, they will have different hashes

karthik
2016-07-05 07:47
@nick.dawson: "The world state of a peer refers to the collection of the states of all the deployed chaincodes". Does the world state contain chaincodes also?

ashnur
2016-07-05 11:52
what is the easiest simplest way to deploy a hello word chaincode to the devnet?


ashnur
2016-07-05 12:32
thank you @cbf :slightly_smiling_face:

ashnur
2016-07-05 12:32
seems like all my questions are answered by you eventually

cbf
2016-07-05 12:35
heh

ashnur
2016-07-05 13:39
I don't know how people manage to use `npm` in `vagrant`. Everything is constantly broken. EPERM ENOENT and a bunch of other errors, fsevents is not supported, live-reload doesn't work..

ashnur
2016-07-05 13:40
right now I am trying to do this `node test/unit/chain-tests.js | node_modules/.bin/tap-spec` from https://github.com/hyperledger/fabric/tree/master/sdk/node#getting-started but of course that requires a successful npm install which is honestly it seems to be beyond impossible

ashnur
2016-07-05 13:44
i am wondering if there is anyone from the developers using a windows host machine to run the ubuntu vagrant box, maybe it is because of that

cbf
2016-07-05 13:46
@arnaud: has been using both mac and windows

cbf
2016-07-05 13:47
I know that many were having issues building the node sdk

ashnur
2016-07-05 13:48
that is discouraging :disappointed:

cbf
2016-07-05 13:51
you might ask in the # channel

cbf
2016-07-05 13:51
oops, #

ashnur
2016-07-05 13:52
will try

cbruguera
2016-07-05 15:01
Hello guys, I 've been reading the protocol specification, and I have a couple of questions...

cbruguera
2016-07-05 15:01
1) "there is no expiration/revocation of ECerts"... Why is that so? Isn't there any mechanism thought in case a user might lose his certificate/keys or have it stolen somehow? Any thoughts on this?

cbruguera
2016-07-05 15:02
2) "it is recommended to only enable the REST service on non-validating peers on production networks"... Why is this so?

jenkins
2016-07-05 20:29
has joined #fabric

cbruguera
2016-07-05 23:17
:thinking_face:

codascud
2016-07-05 23:31
@cbruguera: for your question (2) :


codascud
2016-07-05 23:32
you can think nvp as a gateway to VPs

codascud
2016-07-05 23:33
Thanks to @ghaskins for the diagram

cbruguera
2016-07-05 23:33
Got it, thanks @codascud and @ghaskins

cbruguera
2016-07-05 23:34
So, this nvp should be a trusted peer, since it'll be my gateway...

codascud
2016-07-05 23:34
yes.. it should be trusted...

cbruguera
2016-07-05 23:34
That would be no problem if I (In charge of the hosting tier) run such nvp as well.

cbruguera
2016-07-05 23:35
:grin:

cbruguera
2016-07-05 23:52
Well, I'll make use of the occasion to ask a third question (probaly this has been asked before)...

cbruguera
2016-07-05 23:54
3) All certificate issuance is done by "certificate authorities" (depending on the type of certificate to be used) which so far looks like a single Membership Svc. Server within the network... Are there any plans to further decentralize (or even distribute) such functionality so that there is not a single point of failure in the handling of certificates?

jonathanlevi
2016-07-06 00:18
@cbruguera: Hi Carlos, you can see/read/discuss more about these in #, but specifically to this question it really depends on your definition of single PoF

cbruguera
2016-07-06 00:19
Well, if such server fails, no certificates can be issued.

jonathanlevi
2016-07-06 00:19
While we don't have replication across domains, etc... you can distribute the load and the responsibility and actually delegate roles and affiliations... to make it much more scalable.

jonathanlevi
2016-07-06 00:19
OK, thanks for clarifying.

jonathanlevi
2016-07-06 00:20
So, you can have more than a single server issuing certificates

jonathanlevi
2016-07-06 00:20
You can have several ECAs, TCAs, etc...

cbruguera
2016-07-06 00:20
Ok, so is there some mechanism for distributing such task?

jonathanlevi
2016-07-06 00:20
Nope, but I'm actually working on something along these lines.

cbruguera
2016-07-06 00:21
That's good!

jonathanlevi
2016-07-06 00:21
It's like a July 4th resolution of mine :wink:

jonathanlevi
2016-07-06 00:21
"Land of the Free" :wink:

cbruguera
2016-07-06 00:21
sounds great!

jonathanlevi
2016-07-06 00:21
At the moment, you can see the tests... they create a new ECA and a TCA object (struct)

jonathanlevi
2016-07-06 00:22
Which later on, accept say 'Certficate Signing Requests'

jonathanlevi
2016-07-06 00:22
(of specific sorts, OK? I'm generalizing)

cbruguera
2016-07-06 00:22
Yeah, that would be more elegant (and blockchain-like)

jonathanlevi
2016-07-06 00:22
We do agree that the Certs processing (not issuing) can be hangled 'off-line'

jonathanlevi
2016-07-06 00:23
Yup, I'm totally there. I don't want to work with the direct objects AT ALL, tbh.

cbruguera
2016-07-06 00:23
However, I was pondering how crazy it was to rely the certificate handling to the network itself... Like taking the CA code and make it into smart contracts, maybe using some sort of "shared computation", so that the "authority" is the network, truly decentralizing certificate issuance (even within a permissioned network, decentralization is important)

jonathanlevi
2016-07-06 00:24
I'm doing some refactoring, so that you/one can launch the services, register available functions that are exposed, and then 'consume'

jonathanlevi
2016-07-06 00:24
Hmmm.... First of all, 'crazy' designs/notions are rarely crazy :wink:

cbruguera
2016-07-06 00:25
:slightly_smiling_face:

cbruguera
2016-07-06 00:25
How does that sound to you?

jonathanlevi
2016-07-06 00:25
As for the usages, we can discuss how crazy it can be.

jonathanlevi
2016-07-06 00:25
Want to swtich to # ?

cbruguera
2016-07-06 00:25
yep, sure, thanks.

joverwimp
2016-07-06 12:01
has joined #fabric

joverwimp
2016-07-06 12:01
Question: off chain storage. Where can I find the documents on it, e.g. how can it be accessed, what can be stored, how integrated is it...?

ant2221
2016-07-06 14:07
has joined #fabric

duffhanks
2016-07-06 19:50
has joined #fabric

andres
2016-07-06 19:51
@andres uploaded a file: https://hyperledgerproject.slack.com/files/andres/F1PC1RJ4U/-.go and commented: In the REST API devops services "/devops/query", "/devops/invoke" and "/devops/deploy" were deprecated a time ago and should be use "/chaincode" instead. Using "/chaincode" service I didn't find a way to pass the idGenerationAlg parameter. So my question is should this field be deprecated? or should /chaincode service be modified to support this parameter?

johnrobertfitz
2016-07-07 00:49
has joined #fabric

viewer
2016-07-08 02:46
has joined #fabric

mihaig
2016-07-08 10:08
has joined #fabric


im
2016-07-08 17:20
has joined #fabric

ashnur
2016-07-11 09:45

duncanjw
2016-07-11 10:30
Post by @mikezaccardo on deploying and managing hyperledger fabric spanning San Jose, London and Singapore http://www.cloudsoft.io/ondemand-distributed-hyperledger-fabric-cluster-with-cloudsoft-amp

cbf
2016-07-11 14:33
very nice!

buhrmi
2016-07-12 06:00
that's cool

goodjoon
2016-07-12 08:13
Q ) How should I change password of eca.users ? It does not seems like a plain password... Is there any document about this?

enidz
2016-07-12 08:19
has joined #fabric

ashnur
2016-07-12 08:33
where to read up on chaincode?

goodjoon
2016-07-12 08:47
I'm just modifying membersrvc.yaml File..

goodjoon
2016-07-12 08:47
I'm very new to fabric ..^^;;

enidz
2016-07-12 09:45
Hi I'm having trouble to find the matching EnrollmentPWD for the EnrollmentID https://github.com/hyperledger/fabric/blob/master/docs/API/SandboxSetup.md peer network login <username> for example : peer network login admin Enter password for user 'admin': I tried : admin: 1 Xurw3yU9zI0l institution_a 00001 WebAppAdmin: 1 DJY27pEnl16d institution_a 00002 lukas: 1 NPKYL39uKbkj bank_a 00001 system_chaincode_invoker: 1 DRJ20pEql15a institution_a 00002 diego: 1 DRJ23pEQl16a institution_a 00003 jim: 1 6avZQLwcUe9b bank_a 00004 binhn: 1 7avZQLwcUe9q institution_a 00005 alice: 1 CMS10pEQlB16 bank_a 00006 bob: 1 NOE63pEQbL25 bank_a 00007 assigner: 1 Tc43PeqBl11 bank_a 00008 but none of them worked I assumed that "DJY27pEnl16d" is the password encrypted for admin am I right ? where can I get the enrolledPWD ? thx

karthik
2016-07-12 10:11
@enidz: what is the error that you are getting?

enidz
2016-07-12 10:12

enidz
2016-07-12 10:12
Error: Error on client login: rpc error: code = 2 desc = "grpc: the client connection is closing"

karthik
2016-07-12 10:12
did you start membership services?

enidz
2016-07-12 10:14
that cmd : make membersrvc && membersrvc ???

karthik
2016-07-12 10:14
@enidz: yes

enidz
2016-07-12 10:14
yes i did it

karthik
2016-07-12 10:20
@enidz: I can think of of only this. If you had run this setup before, deleting the production folder might resolve this error. It is given at the end of the document(the link which you have shared). You have to stop the peer, membersrvc, delete the folder and can start them again.

enidz
2016-07-12 10:25
OK thx I try that I let u know if that works

zuowang
2016-07-12 11:38
Ask for help: I have to increase a counter (pay-per-query) in the Query function in chaincode. But I can't do it as Query function call is not a transaction. What should I do?

zuowang
2016-07-12 11:47
At lease, I can Invoke the chaincode to increase the counter, then Query the chaincode.

zuowang
2016-07-12 11:49
But it will be quite slow.

simon
2016-07-12 12:19
you could also just build an application that handles the payment outside of the chaincode

simon
2016-07-12 12:20
and proxies to the chaincode if enough funds are available

ericsomdahl
2016-07-12 13:35
has joined #fabric

alexrosen
2016-07-12 21:28
has joined #fabric

cbruguera
2016-07-13 00:18
Is this "read the docs" for fabric new?

cbruguera
2016-07-13 00:43
Hello, a little problem here. I'm starting up the project. Already got the vagrant up, and I'm ssh'ing into it... I'm following the docs in here http://hyperledger-fabric.readthedocs.io/en/latest/dev-setup/devnet-setup/

cbruguera
2016-07-13 00:45
it says to use `docker images` and `docker rmi` to remove any old images (except for busybox or hyperledger/fabric-baseimage)

cbruguera
2016-07-13 00:45
So i removed "peer-image"

cbruguera
2016-07-13 00:46
Now I want to build it by doin `make peer-image`

cbruguera
2016-07-13 00:46
(at `$GOPATH/src/github.com/hyperledger/fabric`)

cbruguera
2016-07-13 00:46
the shell responds with `make: Nothing to be done for 'peer-image'.`

cbruguera
2016-07-13 00:47
:confused:

cbruguera
2016-07-13 00:47
Is there some error in the docs?

cbruguera
2016-07-13 00:50
I made `git pull` (I'm at `master`), git says I'm up-to-date...

ry
2016-07-13 01:33
@cbruguera: take a look at the ci repo or Jenkins https://gerrit.hyperledger.org/r/gitweb?p=ci-management.git;a=tree https://jenkins.hyperledger.org/view/fabric/job/fabric-github-verify-x86_64/ take a look at the console log of a successful build

cbruguera
2016-07-13 01:41
thanks @ry !

cbruguera
2016-07-13 01:46
Anyway, I wanted to shutdown (in order to re-start the vagrant VM)... I dunno why on earth I thought that `vagrant destroy` would be the right command.. :astonished:

cbruguera
2016-07-13 01:47
setting it up again... :upside_down_face:

ry
2016-07-13 01:50
it’s easier the more you do it :slightly_smiling_face:

cbruguera
2016-07-13 01:56
I bet. :smiley:

cbruguera
2016-07-13 01:58
By the way, by "taking a look at the console log of a successful build", you mean this? https://jenkins.hyperledger.org/view/fabric/job/fabric-github-verify-x86_64/lastCompletedBuild/console

ry
2016-07-13 01:59
sure, click the “full console log” thing for verbose spew

cbruguera
2016-07-13 01:59
What should I be looking for exactly?

ry
2016-07-13 02:00
those show how we spin up and build fabric. I was hoping there was something in there along the lines of what you’re doing

ry
2016-07-13 02:00
build and test

cbruguera
2016-07-13 02:00
Oh I see

cbruguera
2016-07-13 02:00
that's useful

cbruguera
2016-07-13 02:00
thanks

ry
2016-07-13 02:00
if you can replicate that, you can’t be far from what you want

cbruguera
2016-07-13 02:01
Cool! :+1::skin-tone-3:

nkunkel
2016-07-13 04:20
Hi, hoping yall can help me out with a problem I'm having. I have a Chaincode, where I'm routing all of my chaincode calls through Query because that seems to be the only where I can customize the data that gets returned. I basically use the Query as a handler, which then routes the transaction to another function. Now the problem Im having is that checking the peer logs, it gives me a QUERY_ERROR "(Cannot put state in query context). Notify" Why am I not allowed to do a PUT_STATE just because my initial call to the chaincode was a query? So am I stuck with having to use invokes, but not being able to return my own JSON string in the message field like I can with query?

nkunkel
2016-07-13 04:24
With an invoke, I only get a status OK that the chaincode received my transaction, but this is prior to execution. If I run into an error, it won't return the error in a REST response. With a query, the execution is done first, so if an error is encountered during execution, a REST response containing the error is returned to the client.

simon
2016-07-13 09:02
nkunkel: because that's how it works. query is read-only and synchronous, invoke can write, but is asynchronous

nkunkel
2016-07-13 15:48
Okay I get for performance reasons you want to have asynchronous calls. However, from a usability standpoint then, you have to find some other solution, for error handling/reporting back to the client. If the solution is to write my error to the blockchain and query right after every single invoke, that can't possibly scale. Is there another way fabric goes about this that I'm missing?

ghaskins
2016-07-13 15:50
@nkunkel: the support is still emerging, but you will want to tap into the event mechanism

ghaskins
2016-07-13 15:50
that will allow you to close the loop on an otherwise async operation

ghaskins
2016-07-13 15:51
note that this is how all blockchains generally operate...

ghaskins
2016-07-13 15:51
out of necessity

nkunkel
2016-07-13 15:51
I understand why, performance is going to be key if the blockchain is to succeed.

ghaskins
2016-07-13 15:52
well, its all relative

nkunkel
2016-07-13 15:52
So this event mechanism, will it be able to communicate with the original client at all? Could you explain a little more how it will work?

ghaskins
2016-07-13 15:53
I am not on the team doing the work, so I only have a high level understanding, but the basic concept is there is a way to subscribe to published events that a properly authorized client may tap into

ghaskins
2016-07-13 15:53
one of those events could be the completion status of an invoke

ghaskins
2016-07-13 15:54
so, if you wanted to emulate an “RPC” out of an invoke that has gone through consensus, on the wire you would be doing something like [uuid=invoke(params), register(uuid, oneshot), <wait for event>]

ghaskins
2016-07-13 15:55
and then getting the appropriate result once the event completes

cbruguera
2016-07-13 17:10
@ghaskins: Where can I read detailed info on this event mechanism?


cbruguera
2016-07-13 17:12
Thanks!

cbruguera
2016-07-13 17:21
Should `building build/docker/bin/peer` take too long?

ghaskins
2016-07-13 17:30
define “too long” ?

ghaskins
2016-07-13 17:31
i think under most circumstances, a rebuild should be on the order of a handful of seconds and a fresh build may take 30-45s

ghaskins
2016-07-13 17:31
depending on your environment, cpu, network connection, etc

ghaskins
2016-07-13 17:32
is “too long” in the order of 45s? >> 45s ?

cbruguera
2016-07-13 17:39
Hmm it's been hours already :confused:

cbruguera
2016-07-13 17:39
that's "too long"

cbruguera
2016-07-13 17:39
although I'm not sure if this should be considered a "rebuild"

cbruguera
2016-07-13 17:39
I think I'm building from zero

ry
2016-07-13 17:41
is the log emitting anything?

cbruguera
2016-07-13 17:41
good question

cbruguera
2016-07-13 17:41
where is the log file located?

cbruguera
2016-07-13 17:43
The thing is that after getting the VM up, there was not even a fabric-baseimage, so I guessed the build could take some time... But it's been like too long already.

ghaskins
2016-07-13 18:00
@cbruguera: the whole build from scratch only takes a minute or two on my 2009 MacPro 2.93Ghz Nehalem 4c system with 16G RAM and a 70MB/s internet connection

ghaskins
2016-07-13 18:00
i would guess something is wrong

ghaskins
2016-07-13 18:00
sorry, 70Mb/s

ghaskins
2016-07-13 18:01
i wish it was 70MB/s, :wink:

ry
2016-07-13 18:02
eh what’s an order of magnitude or two or eight among friends :slightly_smiling_face:

ghaskins
2016-07-13 18:02
indeed

cbruguera
2016-07-13 18:09
Oh, I see what's probably wrong... I'm really far from those 70Mb/s :smiley:

cbruguera
2016-07-13 18:10
More like 1.5 Mbps in its best moments.

cbruguera
2016-07-13 18:11
:grimacing:

cbf
2016-07-13 19:02
@ghaskins: we really need to have the baseimage go on a diet

ghaskins
2016-07-13 19:03
@cbf: yeah, I really think we should revisit the whole PPA/package conversation in general

cbf
2016-07-13 19:03
+1

ghaskins
2016-07-13 19:03
its getting unwieldy with the other arches coming online

ghaskins
2016-07-13 19:04
what are you seeing in particular though?

cbf
2016-07-13 19:04
yes, well, the image for peer and membersrvc could probably be run in Alpine

cbf
2016-07-13 19:04
not clear why we need all of Ubuntu

ghaskins
2016-07-13 19:05
yeah, certainly for producing a final run target that makes a lot of sense

ghaskins
2016-07-13 19:05
for vagrant/devenv, ubuntu probably makes more sense

ghaskins
2016-07-13 19:06
at the time, the goal was to unify them

ghaskins
2016-07-13 19:06
but now that the build system is a little more sophisticated, it could probably target things more precisely

ry
2016-07-13 21:14
by build system do you mean jenkins, or something else?

cbruguera
2016-07-13 22:33
well, I managed to run a validating peer as in the "getting started" docs :grin:

cbruguera
2016-07-13 22:34
But when I try to run it with "security/privacy enabled", an error occurs.

cbruguera
2016-07-13 22:35

cbruguera
2016-07-13 22:35
I'm guessing it's because I need to run the membership service, right?

cbruguera
2016-07-13 22:36
If so, it should say that in the docs.

jcarrivick
2016-07-14 00:28
has joined #fabric

echigo
2016-07-14 04:11
has joined #fabric

zuowang
2016-07-14 06:23
@nkunkel @ghaskins : I ran into the same problem when I want to implement the feature pay-per-query in chaincode. In order to support higher user concurrencies, I am thinking if I can change to pay by lease: 1. user Invoke the chaincode to pay for his lease for next 30 minutes 2. user Query the chaincode. In Query function, we compare current time to the end of his lease. But I want to know if I can get the current time in chaincode. And there is another problem that time is not synchronized between validator nodes.

zuowang
2016-07-14 06:47
One more thing, how to get the return value of Invoke funtion? If we choose to return through payload in SetEvent(name string, payload []byte), then someone register with eventName = '' or '*' will see it.

lbonniot
2016-07-14 07:41
has joined #fabric

yusen
2016-07-14 07:45
has joined #fabric

yusen
2016-07-14 07:49
I am getting stuck in the vagrant up process. The terminal just hang over on the fabric-baseimage downloading process. It almost costed one day. Could this be some issue in the installation configuration or just a network reason so I can only wait?

ibmamnt
2016-07-14 09:13
The size of the image is around. 1 Gbyte. Maybe you can try debug official registry download speed.


ibmamnt
2016-07-14 09:14
In my environment, the last command was like this: ```$ time curl -svnoo --trace-time http://mirrors.sonic.net/centos/7/isos/x86_64/CentOS-7.0-1406-x86_64-NetInstall.iso real 0m0.850s user 0m0.004s sys 0m0.000s```

gensai
2016-07-14 09:30
has joined #fabric

ashnur
2016-07-14 12:54
`12:52:39.836 [crypto] main -> INFO 002 Log level recognized 'info', set to INFO` I am trying to set loglevel to warning, but it is ignored it seems, or it is not the config/core.yaml where this is set?

ashnur
2016-07-14 13:13
also, I too get the same error as you in zamrokk's comment: https://hub.docker.com/r/hyperledger/fabric-baseimage/


grapebaba
2016-07-14 13:15
this PR should fix crypto log issue

ashnur
2016-07-14 13:17
@grapebaba: this is not yet in the v0.5 dev preview I think

grapebaba
2016-07-14 13:17
:ok_hand::skin-tone-2:

ashnur
2016-07-14 13:18
and thanks for the link :slightly_smiling_face:

grapebaba
2016-07-14 13:18
yr:grinning:

ashnur
2016-07-14 13:21
but now I feel bad because i was told i should use that

dthom
2016-07-14 13:55
has joined #fabric

johanherman
2016-07-14 14:10
has joined #fabric

ashnur
2016-07-14 14:57

ashnur
2016-07-14 14:57
i am having constant errors and issues

garisingh
2016-07-14 15:09
@cbf: I know you opened a git issue about fabric components and naming. Given the consensus V2 concept as well as modularizing membership services / PKI / CA (whatever we decide to call it) is now the right time to create top level projects under hyperledger org for both of these?

cbf
2016-07-14 16:11
@garisingh: yes, but before we do, i think we need to sort out maintainers question… eg do we want to have/keep same maintainers for the new repos? I ask because the new work is actually new work and we need to maintain the old code for a while as deprecated but maintained.

cbf
2016-07-14 16:13
As such, I think that we should make formal proposal as we have been discussing (e.g. via a PR that the current maintainers agree to)

garisingh
2016-07-14 16:13
Agreed. I would propose that we have a more focused set on maintainers added to the new projects ( of course we can kept the current maintainers on those lists as well if they want to be on)

garisingh
2016-07-14 16:13
Sure

rgidron
2016-07-14 16:44
has joined #fabric

harrijk
2016-07-14 17:44
has joined #fabric

kletkeman
2016-07-14 18:08
@zuowang: Regarding timestamps, you can get the transaction timestamp from the stub and store it as the time against which the lease can be compared. But you raise a good point in that a query may not have access to the equivalent of a transaction timestamp. So I wrote a snippet of code: // just testing this trick txnunixtime, err := stub.GetTxTimestamp() if err != nil { err = fmt.Errorf("Error getting transaction timestamp: %s", err) log.Error(err) return nil, err } txntimestamp := time.Unix(txnunixtime.Seconds, int64(txnunixtime.Nanos)) fmt.Println("***** QUERY reads txntimestamp: ", txntimestamp.Format(time.RFC3339Nano)) return assetBytes, nil And got a result that shows that the chaincode always has access to the time of invocation of the function. ***** QUERY reads txntimestamp: 2016-07-14T18:05:43.248880214Z 18:05:43.257 [shim] DEBU : [ff94348e]Query completed. Sending QUERY_COMPLETED So all you need to do is use that snippet of code to capture the transaction time in your invoke and store it into world state. Then perhaps set a timer in your app and start polling perhaps 5 seconds before the expiry and act on it when the time difference in the query exceeds the lease time.

cbf
2016-07-14 22:43
@ramesh just called my attention to the fact that the dockerhub images are named hyperledger/fabric-arch-peer eg hyperledger/fabric-x86_64-peer or hyperledger/fabric-s390x-membersrvc

cbf
2016-07-14 22:43
blech

cbf
2016-07-14 22:44
why is the arch embedded in the name?

ry
2016-07-14 22:44
cbf: this is what @ramesh requested

cbf
2016-07-14 22:44
I had suggested in an issue that we needed consistent names

cbf
2016-07-14 22:45
well, this seems weird to me to have the arch embedded in what I thought we were converging on as the name for the various components.

cbf
2016-07-14 22:45
I could see hyperledger/fabric-peer-arch

ry
2016-07-14 22:45
I will set this up however you would like it.

cbf
2016-07-14 22:45
because then you can easily script


cbf
2016-07-14 23:12
so, talked with a friend in Docker land… IBM is actually putting the finishing touches on multi-architecture support for Docker registry

cbf
2016-07-14 23:12
should land in the next month or so and manifest itself in a release in the fall I would expect

cbf
2016-07-14 23:13
I will propose a naming scheme in ci-pipeline

lin
2016-07-15 05:16
has joined #fabric

zuowang
2016-07-15 06:55
@kletkeman: Thank you so much! That's exactly what I want. I might not need the timer and polling work since users are forced to extend when his lease is expired.:smiley:

kletkeman
2016-07-15 13:38
@zuowang: Glad it's useful for you. My suggestion was for the app that determines that the lease is over, which it can easily do by polling a query that returns the lease state (which contains the start timestamp). Of course, the app could actually choose to expire the lease with its own timer, but I would probably use the blockchain query to officially expire it (and post that as an event to be added to the state). With a short grace period, the customer can then be given the option to extend and that recorded as another event against the lease, which is then restarted. Rinse, repeat :slightly_smiling_face:

mikeb
2016-07-15 18:18
who all is coming to the SF hyperledger meetup


nkunkel
2016-07-15 19:04
Too expensive for me :disappointed:

cbf
2016-07-15 20:51
it’s sold out anyhow


cbruguera
2016-07-15 21:35
after what looks like (at last) a proper provisioning of the vagrant VM, `docker images` is showing me this.

cbruguera
2016-07-15 21:36
what I don't get is this `<none>` thing..

cbruguera
2016-07-15 21:36
Is that ok?

cbruguera
2016-07-15 21:39
looks strange

cbf
2016-07-15 22:39
I don’t have that

cbf
2016-07-15 22:39
vagrant@hyperledger-devenv:v0.0.10-087610d:~$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE hyperledger/fabric-ccenv latest 3e8b0e5e31f2 9 days ago 1.438 GB hyperledger/fabric-src latest a27407f89abd 9 days ago 1.421 GB hyperledger/fabric-baseimage latest 476ea56a7ef9 9 days ago 1.385 GB busybox latest 2b8fd9751c4c 3 weeks ago 1.093 MB hyperledger/fabric-baseimage x86_64-0.0.10 a2392cc113fd 7 weeks ago 1.076 GB vagrant@hyperledger-devenv:v0.0.10-087610d:~$

cbf
2016-07-15 22:40
you can probably safely delete it

cbruguera
2016-07-15 22:40
thanks

cbruguera
2016-07-15 22:40
Hey, maybe you can help me with something.. :slightly_smiling_face:

cbruguera
2016-07-15 22:41
I managed run membersrvc, and two nodes just as the doc example says

cbruguera
2016-07-15 22:41
but if I shutdown one node and try to restart it again (with the same id and password), an error occurs:

cbruguera
2016-07-15 22:42
"Identity or token does not match"

cbruguera
2016-07-15 22:42
It looks like the CA is trying to create new certificates

cbruguera
2016-07-15 22:42
to which it ends with such error

cbruguera
2016-07-15 22:42
(which is not too clear, in my opinion)

cbruguera
2016-07-15 22:43
shouldn't the membersrvc just try to login if credentials already exist, instead of trying to re-enroll?

cbruguera
2016-07-15 22:44
(the same thing happens with users trying to enroll/login through a peer)

cbruguera
2016-07-15 22:44
@cbf any idea?

cbf
2016-07-15 22:45
@jonathanlevi: would be better positioned to answer that

cbruguera
2016-07-15 22:45
Hmm well, let's wait until he shows up. Thanks!

cbf
2016-07-15 22:45
or try in # channel

cbruguera
2016-07-15 22:46
:+1::skin-tone-3:

cbruguera
2016-07-15 23:10
Any recommended way to test making API calls to a local peer node (running through Vagrant)?

cbruguera
2016-07-15 23:10
Is there a way I can make the calls from outside vagrant?

cbruguera
2016-07-15 23:11
This is my set-up: Windows --> Vagrant VM --> Docker --> Hyperledger peer

cbruguera
2016-07-15 23:12
I can effectively ping the IP addresses of the hyperledger nodes running inside my VM

cbruguera
2016-07-15 23:12
But how about making REST calls?

jonathanlevi
2016-07-15 23:20
@cbruguera/Carlos: Yes, hit us up in #

leo
2016-07-16 04:46
has joined #fabric

svr
2016-07-17 10:34
has joined #fabric

voodoo
2016-07-17 13:37
has joined #fabric

zuowang
2016-07-18 07:00
@kletkeman: You are right! I was thinking setting an fixed lease (30 min) when user Invoke the chaincode: UserA -----------Invoke------------> Chaincode(decrease UserA's token, record UserA->CurrentTxTime) UserA------------Query------------> Chaincode(get UserA->CurrentTxTime, check if time.Now().Sub(CurrentTxTime) < 30 min) But it might be wrong as it depends on the node's system time(time.Now()).

zuowang
2016-07-18 07:57
How to get the return result from an Invoke in RESTAPI? Thanks very much!!! ``` func (t *XXXChaincode) Invoke(stub *shim.ChaincodeStub, function string, args []string) ([]byte, error) ```

simon
2016-07-18 11:28
zuowang: you cannot

simon
2016-07-18 11:28
you need to wait for the transaction to commit

simon
2016-07-18 11:28
then you can look on the blockchain

ashnur
2016-07-18 11:31
what to do if deploy fails with `[dockercontroller] deployImage -> ERRO 051 Error building images` ?

ashnur
2016-07-18 11:31
where to look for logs?

zuowang
2016-07-18 11:49
@simon: Does that means I need to provide a webservice for users to Pay(Invoke) and then Query the chaincode if I want them to pay for each query? I thought users can use the REST API directly. Seams it dosen't work.

simon
2016-07-18 11:57
yea it doesn't work

simon
2016-07-18 11:58
you need your own frontend

simon
2016-07-18 11:58
but of course if the user has access to the blockchain contents, they can just run a query themselves

simon
2016-07-18 11:58
and don't have to pay

buhrmi
2016-07-18 12:03
@simon: u work for ibm?

ashnur
2016-07-18 12:08
what is the smallest valid chaincode?

simon
2016-07-18 12:10
return nil, nil?

ashnur
2016-07-18 12:17
that sounds great

simon
2016-07-18 12:17
what are you after?

ashnur
2016-07-18 12:17

ashnur
2016-07-18 12:18
and I am building and deploying some random chaincode I hacked together from the examples, very minimal

ashnur
2016-07-18 12:18
and I would like to see some kind of log or output when I invoke a function to see that it does what I want

simon
2016-07-18 12:18
there is a chaincode development mode, i think

simon
2016-07-18 12:19
where you run the chaincode outside of docker

ashnur
2016-07-18 12:19
what I saw was something inside vagrant inside docker

zuowang
2016-07-18 12:41
@simon: gotcha! Thank you

simon
2016-07-18 12:44
zuowang: what are you working on?

sergeybalashevich
2016-07-18 13:11
has joined #fabric

ashnur
2016-07-18 13:26
simon: thanks! (it was --peer-chaincodedev )

cbf
2016-07-18 13:36
correct - I updated the docs to make chaincode development clearer


cbf
2016-07-18 13:37
I’d welcome any feedback

ashnur
2016-07-18 13:53
@cbf: seems to be working, but I still don't know how to have immediate feedback while working on it

cbf
2016-07-18 13:54
feedback is the same, via log messages etc but the benefit is that you don’t need to (re)deploy the chaincode everytime you iterate through the develop, compile, run cycle

cbf
2016-07-18 13:55
so the benefit isn’t better feedback but a tighter feedback loop

ashnur
2016-07-18 13:57
that's great, I see the value in it, obviously but I don't know how this is going to work (i am re-reading that chaincode-setup doc you just linked, hoping maybe there is some explanation there), and I couldn't get feedback through logging before either. Maybe I am using the wrong images? I am trying with yeasy/hyperledger-peer


ashnur
2016-07-18 14:05

cbf
2016-07-18 14:06
correct, then you can send invoke and query transactions

ashnur
2016-07-18 14:12
@cbf I think it's working, but because of my lack of experience with Go, I think I am messing up something around the logging part and that's why I don't see the output I expect

ashnur
2016-07-18 14:13
I do see the “Received REGISTERED” message

muralisr
2016-07-18 14:19
@ashnur: you could use a query to verify expected result.

ashnur
2016-07-18 14:20
i could, if I had a brain, but that's for smart people :smile:

ashnur
2016-07-18 14:20
thanks @muralisr

ashnur
2016-07-18 14:20
i was trying with invoke

muralisr
2016-07-18 14:21
@ashnur… now you are talking like me :slightly_smiling_face:

ashnur
2016-07-18 14:29
not sure that's a good thing or a bad thing @muralisr :slightly_smiling_face: especially for you :smile:

ashnur
2016-07-18 14:29
``` Error: Error querying chaincode: rpc error: code = 2 desc = "Error:Failed to launch chaincode spec(Could not get deployment transaction for poc001 - LedgerError - ResourceNotFound: ledger: resource not found)"```

ashnur
2016-07-18 14:30
this is what I am getting :disappointed:

muralisr
2016-07-18 14:30
ok. I suspect the deploy did not go through

muralisr
2016-07-18 14:30
you are using —peer-chaincodedev mode ?

ashnur
2016-07-18 14:30
yup, i already shared my docker-compose file a few lines above

ashnur
2016-07-18 14:31
wait. do i have to deploy AND register?

muralisr
2016-07-18 14:32
you need to just deploy…

muralisr
2016-07-18 14:33
can you share your chaincode command line and the deploy command line ?

ashnur
2016-07-18 14:39
I thought I don't have to deploy, just register

ashnur
2016-07-18 14:39
what is chaincode command line?

muralisr
2016-07-18 14:40
I meant the command you ran the chaincode with

ashnur
2016-07-18 14:41
it's in the docker-compose.yml file I shared above

muralisr
2016-07-18 14:42
you do have to “deploy” even when running the chaincode yourself in -peer-chaincodedev mode to have the “Init” method called

ashnur
2016-07-18 14:43
yeah, i did deploy now, and then ran REGISTER again, but nothing changed

muralisr
2016-07-18 14:44
I see "peer node start --peer-chaincodedev” in yaml file but I was asking about the chaincode execution itself

muralisr
2016-07-18 14:44
so here’s what I do

muralisr
2016-07-18 14:45
CORE_PEER_ADDRESS=127.0.0.1:30303 CORE_CHAINCODE_ID_NAME=mycc ./mychaincode

muralisr
2016-07-18 14:45
and

muralisr
2016-07-18 14:46
./peer chaincode deploy -n mycc -c ‘{“Function”:”f”, “Args”:[“a”, “100”, “b”, “200”]}'

muralisr
2016-07-18 14:47
with the peer running in —peer-chaincodedev (as in your yaml)

ashnur
2016-07-18 14:48
muralisr: `peer chaincode query -u jim -p local-dev -n poc001 -c '{"Function":"invoke", "Args": ["a","100", "b", "200"]'}`

muralisr
2016-07-18 14:48
and deploy ?

ashnur
2016-07-18 14:48
`peer chaincode deploy -u jim -n poc001 -p local-dev -c '{"Function":"init", "Args": ["a","100", "b", "200"]}'`

muralisr
2016-07-18 14:48
ok

muralisr
2016-07-18 14:49
I assume your chaincode is running like so `CORE_PEER_ADDRESS=127.0.0.1:30303 CORE_CHAINCODE_ID_NAME=poc001 ./mychancode`

muralisr
2016-07-18 14:49
?

ashnur
2016-07-18 14:50
muralisr: `CORE_CHAINCODE_ID_NAME=poc001 CORE_PEER_ADDRESS=0.0.0.0:30303 ./local-dev`

muralisr
2016-07-18 14:51
ok

ashnur
2016-07-18 14:51
this is why I asked what is the minimum valid chaincode :slightly_smiling_face:

muralisr
2016-07-18 14:51
if you see “Received REGISTERED” message you shoukd be good to go

muralisr
2016-07-18 14:52
(and I see you did get that)

cbruguera
2016-07-18 17:53
Does the `membersrvc` need to be restarted everytime a change is made to membersrvc.yaml? (in order to register a new user, for example)

sergeybalashevich
2016-07-18 19:44
membersrvc imports information from membersrvc.yaml at first start only. If you would like to re-import changes from yaml, you have to delete existing configuration from “/var/hyperledger/production/.membersrvc/“ at first, then restart membersrvc.

jonathanlevi
2016-07-18 19:47
@cbruguera: please use the # channel for such questions. (and of course, thank you Sergey)

cbruguera
2016-07-18 19:55
Thank you both!

adam1
2016-07-18 22:10
has joined #fabric

james.buckett
2016-07-19 00:02
has joined #fabric

bgorman
2016-07-19 01:58
has joined #fabric

danayelx
2016-07-19 02:16
has joined #fabric

ashishkel
2016-07-19 04:07
has joined #fabric

thirumanoj
2016-07-19 12:46
has joined #fabric

thirumanoj
2016-07-19 12:49
i have a chaincode deployed on all the nodes as a container. Now that i have updated some logic (another version) of same chaincode.. is there a way i can remove the chaincode deployed in hyperledger and redeploy the new chaincode ??

s.matthew.english
2016-07-19 14:28
has joined #fabric

s.matthew.english
2016-07-19 14:29
I ran vagrant and then "peer node start" in two different terminal windows

s.matthew.english
2016-07-19 14:29
then I ran " ./peer chaincode deploy -p http://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Function":"init", "Args": ["a","100", "b", "200"]}’

s.matthew.english
2016-07-19 14:30
but that resulted in a kind of prompt, like this

s.matthew.english
2016-07-19 14:30
>

s.matthew.english
2016-07-19 14:30
and that's as far as I got

s.matthew.english
2016-07-19 14:30
how can I see some action?

simon
2016-07-19 14:30
your copy+paste is borken

s.matthew.english
2016-07-19 14:30
or know if everything (or anything) is working correctly

s.matthew.english
2016-07-19 14:30
:confused:

simon
2016-07-19 14:30
you have two different single quote characters

s.matthew.english
2016-07-19 14:30
./peer chaincode deploy -p http://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Function":"init", "Args": ["a","100", "b", "200"]}’

s.matthew.english
2016-07-19 14:31
thats what I ran

simon
2016-07-19 14:31
yes, still two different single quote characters

s.matthew.english
2016-07-19 14:31
ah

s.matthew.english
2016-07-19 14:31
hmm

s.matthew.english
2016-07-19 14:31
./peer chaincode deploy -p http://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Function":"init", "Args": ["a","100", "b", "200"]}'

s.matthew.english
2016-07-19 14:31
so try with that?

s.matthew.english
2016-07-19 14:34
it said "./peer is a directory"

s.matthew.english
2016-07-19 14:34
and didn't work

s.matthew.english
2016-07-19 14:34
so I pointed it to "/build/bin/peer"

s.matthew.english
2016-07-19 14:34
and it still didn't work

s.matthew.english
2016-07-19 14:35
Error: Error building chaincode: Error trying to connect to local peer: grpc: timed out trying to connect

iko
2016-07-19 14:44
has joined #fabric

codascud
2016-07-19 15:59
What does the following messages do? I am runing only one peer but see a spike in out-bound traffic from my machine. 15:56:18.516 [peer] ensureConnected -> INFO 1e5 Touch service indicates no dropped connections 15:56:18.516 [peer] ensureConnected -> DEBU 1e6 Connected to: [] 15:56:18.516 [peer] ensureConnected -> DEBU 1e7 Discovery knows about: [] 15:56:24.516 [peer] ensureConnected -> INFO 1e8 Touch service indicates no dropped connections 15:56:24.516 [peer] ensureConnected -> DEBU 1e9 Connected to: [] 15:56:24.516 [peer] ensureConnected -> DEBU 1ea Discovery knows about: [] 15:56:30.516 [peer] ensureConnected -> INFO 1eb Touch service indicates no dropped connections 15:56:30.516 [peer] ensureConnected -> DEBU 1ec Connected to: [] 15:56:30.516 [peer] ensureConnected -> DEBU 1ed Discovery knows about: [] 15:56:36.516 [peer] ensureConnected -> INFO 1ee Touch service indicates no dropped connections 15:56:36.516 [peer] ensureConnected -> DEBU 1ef Connected to: [] 15:56:36.516 [peer] ensureConnected -> DEBU 1f0 Discovery knows about: []

nhrishi
2016-07-19 16:04
@codascud: if you run only one peer, this is expected output. If you run another peer connecting to this one..output will display you all the connected peers.

codascud
2016-07-19 16:08
Thanks @nhrishi but is there a reason why there is a spike in the outbound traffic? Is fabric trying to reach some external server (or peer)?

nhrishi
2016-07-19 16:11
@codascud: Not sure about that. I didnt observe that.

kkoiwai
2016-07-19 20:20
has joined #fabric

jonathanlevi
2016-07-19 21:12
To those who wanted to go to "Inside Blockchain + the Hyperledger Project" at RocketSpace (San Francisco) today: http://www.rocketspace.com/events/inside-blockchain-and-hyperledger-project

jonathanlevi
2016-07-19 21:13
and haven't manage to get tickets... I have just been informed that there is another set especially for you/us(/procrasinators ;-))

jonathanlevi
2016-07-19 21:14

atulkc
2016-07-19 21:33
has joined #fabric

atulkc
2016-07-19 21:34
we posted a question on # channel but thought it would be more appropriate here: we are seeing some unexpected behavior when trying out hyperledger fabric...we set up our own network with 3 validating peers (using pbft consensus) and pushed deployed some chaincode and did some invoke/query transactions....then we added another validating peer to the network and queried (using REST endpoint) the newly added peer about the block chain length (`/chain/blocks`) and found that it is always `1`. So when we try to do `query` of already deployed chaincode then it fails saying transaction id not found....we tried with `noops` consensus also and saw the same behavior...are we missing something? we waited for more than 5 mins to make sure that it is not a timing issue (the total block chain height was 4 so it shouldn't have taken long for syncing)

kostas
2016-07-19 21:43
@atulkc: Dynamically adding peers after the network has been configured/created is not supported yet.

atulkc
2016-07-19 21:43
@kostas: ok...so its on road map?

kostas
2016-07-19 21:57
Yes. We understand the need for it.

warm3snow
2016-07-20 03:13
has joined #fabric

ashnur
2016-07-20 11:51
how to debug this? `Chaincode handler FSM cannot handle message (ERROR) with payload size (69) while in state: ready`

kletkeman
2016-07-20 14:58
Perhaps in debug mode we could suppress this annoying message ... or at least dramatically increase the timeout ... 14:56:19.813 [peer] ensureConnected -> INFO 019 Touch service indicates no dropped connections 14:56:25.814 [peer] ensureConnected -> INFO 01a Touch service indicates no dropped connections 14:56:31.814 [peer] ensureConnected -> INFO 01b Touch service indicates no dropped connections 14:56:37.814 [peer] ensureConnected -> INFO 01c Touch service indicates no dropped connections 14:56:43.814 [peer] ensureConnected -> INFO 01d Touch service indicates no dropped connections 14:56:49.816 [peer] ensureConnected -> INFO 01e Touch service indicates no dropped connections 14:56:55.819 [peer] ensureConnected -> INFO 01f Touch service indicates no dropped connections 14:57:01.815 [peer] ensureConnected -> INFO 020 Touch service indicates no dropped connections 14:57:07.817 [peer] ensureConnected -> INFO 021 Touch service indicates no dropped connections 14:57:13.814 [peer] ensureConnected -> INFO 022 Touch service indicates no dropped connections 14:57:19.815 [peer] ensureConnected -> INFO 023 Touch service indicates no dropped connections 14:57:25.819 [peer] ensureConnected -> INFO 024 Touch service indicates no dropped connections 14:57:31.814 [peer] ensureConnected -> INFO 025 Touch service indicates no dropped connections 14:57:37.816 [peer] ensureConnected -> INFO 026 Touch service indicates no dropped connections 14:57:43.820 [peer] ensureConnected -> INFO 027 Touch service indicates no dropped connections

liewsc
2016-07-20 15:11
has joined #fabric

joseph
2016-07-20 16:23
First, I removed cryptographic material from /var/hyperledger/producton/*

joseph
2016-07-20 16:23
then I started membersrvc

joseph
2016-07-20 16:24
then I started CORE_SECURITY_ENABLED=true CORE_SECURITY_PRIVACY=true peer node start --peer-chaincodedev

joseph
2016-07-20 16:24
I got error messages

joseph
2016-07-20 16:24
16:21:29.880 [eventhub_producer] start -> INFO 004 event processor started 16:21:30.042 [crypto] Errorf -> ERRO 008 [validator.vp] Failed invoking CreateCertficatePair [rpc error: code = 2 desc = "Identity or token does not match."]. 16:21:30.042 [crypto] Errorf -> ERRO 009 [validator.vp] Failed getting enrollment certificate [id=vp]: [rpc error: code = 2 desc = "Identity or token does not match."] 16:21:30.043 [crypto] Errorf -> ERRO 00a [validator.vp] Failed retrieving enrollment data [rpc error: code = 2 desc = "Identity or token does not match."]. 16:21:30.043 [crypto] Errorf -> ERRO 00b [validator.vp] Failed registering node crypto engine [rpc error: code = 2 desc = "Identity or token does not match."]. 16:21:30.044 [crypto] Errorf -> ERRO 00c [validator.vp] Failed registering peer [vp]: [rpc error: code = 2 desc = "Identity or token does not match."] 16:21:30.044 [crypto] Errorf -> ERRO 00d [validator.vp] Failed registering [vp]: [rpc error: code = 2 desc = "Identity or token does not match."] 16:21:30.045 [crypto] RegisterValidator -> ERRO 00e Failed registering validator [vp] with name [vp] [rpc error: code = 2 desc = "Identity or token does not match."].

joseph
2016-07-20 16:26
Could you give me an explanation about this error?

rseeger
2016-07-21 17:38
has joined #fabric

dulcinea
2016-07-21 23:59
has joined #fabric

joseph
2016-07-22 07:08
Hello

joseph
2016-07-22 07:08
When I deploy chaincode

joseph
2016-07-22 07:08
I got this message

joseph
2016-07-22 07:08
Failed to deploy chaincode: request={"fcn":"init","args":["hello"],"chaincodePath":"http://github.com/chaincode-app-go"}, error={"error":{"code":2,"metadata":{"_internal_repr":{}}},"msg":"Error: sql: no rows in result set"}

joseph
2016-07-22 07:08
Could you please give me an idea about it?

ibmamnt
2016-07-22 08:19
Not sure if this helps and assumes this is test environment and can be recreated. I see this error when I run new membersrvc, and keyvalue store of Node.JS client (e.g. /tmp/keyValueStore) was not deleted with the new membersrvc instance. Try to delete keyvalue store if you have new membersrvc.

virajkamat
2016-07-22 11:11
I have a question for the fabric team

virajkamat
2016-07-22 11:13
We have several institution that want to interact with each other and maintain a common ledger. Each transaction that is initiated by a party contains information of that party and another party involved in the chain. We do not want the transaction to reach a third institution as it has no connection with the transaction. The intention is to avoid executing the chain code at a part that is not connected with the transaction.

virajkamat
2016-07-22 11:13
How could we achieve this, what sort of features do you have under development or are proposed for development that can achieve this functionality.

muralisr
2016-07-22 11:37
@virajkamat: this type of requirement maybe better addressed in the next consensus architecture proposalhttps://github.com/hyperledger/fabric/wiki/Next-Consensus-Architecture-Proposal

virajkamat
2016-07-22 11:43
Im guessing there is no feature present as of now. Is this issue addressed in the next Consensus architecture protocol

virajkamat
2016-07-22 12:12
What if a confidentiality policy is applied. In that case will the data be hidden from the endorsing peer not allowed to view the data

ray
2016-07-22 15:41
has joined #fabric

joseph
2016-07-23 16:09
I read the spec of hyperledger/fabric. I don’t see any thing about proof of work. I just see it mentions proof of agreement. Could you please tell me about proof of work, proof of agreement on hyperledger/fabric?

tuand
2016-07-23 17:35
fabric uses PBFT as its consensus algorithm ( chapter 5 in the protocol-spec doc ), not proof of work. We're also working on a new architecture https://github.com/hyperledger/fabric/wiki/Next-Consensus-Architecture-Proposal that will allow plugins of other consensus protocols

joseph
2016-07-24 05:23
@tuand: thanks.

kurokuro
2016-07-25 00:05
has joined #fabric

virajkamat
2016-07-25 04:09
Hey guys

virajkamat
2016-07-25 04:11
We have several institutions that want to interact with each other and maintain a common ledger. Each transaction that is initiated by a party contains information of that party and another party involved in the chain. We do not want the transaction to reach a third institution that has no connection with the transaction. The intention is to avoid notifying a party that a transaction happened when the transaction is not relevant to the party. The transaction should be seen by only the 2 parties that are involved in it. Confidentiality of the transaction is not the objective of doing this. We want to avoid other parties spending computational resources on the transaction. If the result of the computation reaches all peers, we don’t mind. But the cause of the change should not make it to peers other than the ones involved in the transaction. At the transaction level, is it possible to specify the peers that will be made aware of the transaction. It is acceptable that the result of the transaction will be made available to all peers.

yajneshrai
2016-07-25 04:16
has joined #fabric

bgorman
2016-07-25 05:18
@virajkamat: I'm not sure how much of what you're asking for is available in pbft consensus, but you might want to read this: https://github.com/hyperledger/fabric/wiki/Next-Consensus-Architecture-Proposal

bgorman
2016-07-25 05:25
does anyone here know if peers are meant to recover if they "miss" a transaction due to being offline? My scenario is vp0 thru vp3 running pbft. Then vp0 goes offline (docker stop vp0), while a transactions occurs on another peer. Then vp0 comes back up (docker start vp0) and it never seems to learn of the transaction that happened while down. Any transactions on vp0 is never replicated to the other peers and the same goes for the other peers transactions not replicating to vp0. I just end up with repeated logs like this: `05:24:45.151 [consensus/pbft] sendViewChange -> INFO bac Replica 0 sending view-change, v:1, h:0, |C|:1, |P|:2, |Q|:3` `05:24:45.152 [consensus/pbft] recvViewChange -> INFO bad Replica 0 received view-change from replica 0, v:1, h:0, |C|:1, |P|:2, |Q|:3` `05:24:45.152 [consensus/pbft] recvViewChange -> WARN bae Replica 0 already has a view change message for view 1 from replica 0`

ashishkel
2016-07-25 06:51
@bgorman: if i remember correctly, that depends on the consensus setup.

ashishkel
2016-07-25 06:51
and there is some formula in case of pbft, on the basis of which a lagging node catches up..

ashishkel
2016-07-25 06:52
i mean the catchup is triggered only if that formula's condition is satisfied.

bgorman
2016-07-25 06:53
ok... I'm running batch pbft with the default settings I came across this issue as well which seems very relevant https://github.com/hyperledger/fabric/issues/1331

bgorman
2016-07-25 06:54
currently running 500-ish transactions to see if it makes my lagging node catch up

ashishkel
2016-07-25 06:54
YEs,

ashishkel
2016-07-25 06:54
thsi issue was even what i was looking to point you to :_

ashishkel
2016-07-25 06:54
:slightly_smiling_face:

bgorman
2016-07-25 06:55
haha, I can't even query my laggard peer now... Error: Error querying chaincode: rpc error: code = 2 desc = "Error: state may be inconsistent, cannot query"

ashishkel
2016-07-25 06:55
there somewhere towards the end, this formula of 2f+1 or something was quoted.

ashishkel
2016-07-25 06:55
oh man.. :wink:

bgorman
2016-07-25 06:56
yeah ok, you mean how pbft tolerates (n-1)/3 failures in an 'n' node network

ashishkel
2016-07-25 06:57
oh yea , sorry my bad.. my memory with mathematical stuff is horrible :slightly_smiling_face:

bgorman
2016-07-25 06:57
I didn't think it was meant to leave the failing nodes permanently behind though

bgorman
2016-07-25 06:57
there's nothing wrong with my laggard peer, it just missed one transaction while it was offline

ashishkel
2016-07-25 06:58
but it also said, that the catch up will start once the number of proper nodes is below some number..

bgorman
2016-07-25 06:59
yeah I'm doing the same to a second node now... to see if it helps

bgorman
2016-07-25 06:59
2/4 should not be tolerated

ashishkel
2016-07-25 07:00
all the very best :slightly_smiling_face:

bgorman
2016-07-25 07:00
wow.... it actually seems to have caught them all up

bgorman
2016-07-25 07:00
that seems .... odd

ashishkel
2016-07-25 07:01
u mean, it worked ?

ashishkel
2016-07-25 07:02
then u shd be happy, i guess?

bgorman
2016-07-25 07:13
yeah I am reasonably happy they caught up, but it's weird that 1/4 is perfectly happy in never being able to catch up on its own

bgorman
2016-07-25 07:13
if you happen to be querying the node that's behind, you will never know that you're getting old data

bgorman
2016-07-25 07:28
it looks like the height of the blockchain on the laggard peer does not increase despite invoking on it, so perhaps I just need to run many more transactions on the laggard

bgorman
2016-07-25 07:44
so I'm running 5000 transactions against the laggard... it is consistently a number of blocks behind the other peers 358-300-358-358 728-720-728-728 876-840-876-876 etc

bgorman
2016-07-25 08:03
same thing happens if I swap to running transactions on the up-to-date peers... the laggard never fully catches up, but it does move on from the original state

ashishkel
2016-07-25 08:43
that means, the consensus messages of the current transactions [ occurring on other nodes ] are being received by the lagging node. Okay...

ashishkel
2016-07-25 08:44
and the new transactions on the laggin nodes do get distributed to the other nodes..

ashishkel
2016-07-25 08:45
and the only problem the transactions which it missed while it was down... is it?

simon
2016-07-25 10:16
bgorman: just inject more transactions

simon
2016-07-25 10:16
bgorman: it is normal that f peers will be behind

simon
2016-07-25 10:17
bgorman: you can't tell whether they are byzantine or just slow

huxd
2016-07-25 10:46
has joined #fabric

andyb
2016-07-25 12:30
has joined #fabric

sean
2016-07-25 14:55
has joined #fabric

vpaprots
2016-07-25 21:25
so I spent this afternoon on something that is probably very obvious to people on the channel.. well, it was not too me! So.. perhaps you will find it useful.. I was trying to deploy chaincode that happens to be on my own branch of hyperledger.. i.e. https://github.com/vpaprots/fabric/tree/laszlo-branch/examples/chaincode/go/ingredients which took me for a trip of errors: https://github.com/hyperledger/fabric/blob/master/core/chaincode/platforms/golang/hash.go so.. I got to prefix things with http/https.. fine, didnt know that.. so, did that and `you still no wonky work!`.. next spread some unwelcome attention onto `go get` command... http://stackoverflow.com/questions/30188499/how-to-do-go-get-on-a-specific-tag-of-a-github-repository

vpaprots
2016-07-25 21:25
yep.. so no go get on branch.. sigh

vpaprots
2016-07-25 21:26
@garisingh: ^^^ I bugged you about this at one point.. @muralisr ^^ I am told you are the guy to talk about that.. though at this point its more about an FYI and "why you do this to me!"

virajkamat
2016-07-26 10:18
Hi

virajkamat
2016-07-26 10:22
I had asked this question earlier and was told to refer to the Consensus architecture proposal. I couldn't find anything relevant to it. I was hoping someone could have a look at our requirements and shed light on the following query: We have several institutions that want to interact with each other and maintain a common ledger. Each transaction that is initiated by a party contains information of that party and another party involved in the chain. We do not want the transaction to reach a third institution that has no connection with the transaction. The intention is to avoid notifying a party that a transaction happened when the transaction is not relevant to the party. The transaction should be seen by only the 2 parties that are involved in it. Confidentiality of the transaction is not the objective of doing this. We want to avoid other parties spending computational resources on the transaction. If the result of the computation reaches all peers, we don’t mind. But the cause of the change should not make it to peers other than the ones involved in the transaction. At the transaction level, is it possible to specify the peers that will be made aware of the transaction. It is acceptable that the result of the transaction will be made available to all peers. How can we achieve this ?

simon
2016-07-26 11:40
virajkamat: how are they then maintaining a common ledger?

simon
2016-07-26 11:41
if we have party A, B, C, and a transaction between A and B happens, and C shouldn't get it, doesn't that mean that there is no common ledger between A B and C, but only between A and B?

oleg
2016-07-26 13:24
has joined #fabric

dgorman
2016-07-26 14:21
has joined #fabric

naruhito.t
2016-07-26 14:32
has joined #fabric

sebastian
2016-07-26 14:41
has joined #fabric

jean.safar
2016-07-26 21:11
has joined #fabric

jean.safar
2016-07-26 21:12

cbf
2016-07-26 21:17
We've talked about this previously. Now is the time to transition to Gerrit and Jira for the Fabric project. Many are at the Hackfest here in SF, but for those who are not, we'll have to be adapting our workflow to using Gerrit. The rationale for transitioning to Gerrit is to a) provide much more governance over the IP hygiene by enforcing the DCO sign-off on every commit merged (no exceptions). We did not have this level of rigor on GitHub. b) to enforce that no maintainer can merge their own commits. c) to enforce a rule that requires multiple reviewers to agree to a merge. This may slow things down initially until we all get the swing of the new flow, but it will give us higher quality code and much better IP assurances. The Gerrit repo will be here: https://gerrit.hyperledger.org/r/#/admin/projects/fabric Currently, the code is in the process of being migrated over. There's an active review here https://gerrit.hyperledger.org/r/#/c/255/ for the initial commit of code to Gerrit. Once that is merged by the maintainers, everyone will need to clone that repo for their development going forward, and do git pushes to Gerrit. Basically, I have copied the GH code into a pristine git repository at the behest of LF so that we can benefit from the IP hygiene hooks in Gerrit that assure that every commit carries a DCO sign-off. To submit code for review, you will need a Linux Foundation ID here: https://identity.linuxfoundation.org/ . Simple enough,if you have an ID, you are set. If not, please create one. This will grant you SSO across the LF tools portfolio. Add your SSH key to Gerrit 1. click on your profile (upper right hand corner) and select 'Settings' and then 'SSH Public Keys' 2. from a terminal window: pbcopy < ~/.ssh/id_rsa.pub 3. paste into the Gerrit window for your SSH key 4. press 'Add' button So, the new workflow would be as follows: 1. Clone the Gerrit repository. 1.a from the Projects menu in Gerrit, click 'list' in the LF corner. 1.b from the list of projects, select 'fabric' (note, you will want to PRESERVE your previous Fabric repository clone because you may want to be able to push any outstanding PRs to Gerrit by copying the source from your GH clone to the Gerrit clone). 1.c from the project window, select 'Clone with commit hook' and then copy the command and paste to a terminal window to clone the repository into your $GOPATH/src/github.com/hyperledger folder. 2. make your changes 3. commit your code 4. git push origin HEAD:refs/for/master The GH fabric repo will remain in read-only mode until we establish the mirror from Gerrit. We will preserve the current state of the hyperledger/fabric repo (and all subsequent transitioned repositories) for posterity at a location TBD (likely something like 'hyperledger-archive' org on GH).

cbf
2016-07-26 21:17
@cbf pinned a message to this channel.

cbf
2016-07-26 21:18
: ^^

cbf
2016-07-26 22:06
we have merged the initial commit into Gerrit as above. The workflow I outlined is in play

jcarrivick
2016-07-27 00:53
@cbf: I have created a Linux Foundation ID but can't seem to sign-in to Gerrit to add my SSH key. Is there something else I need to do to link them up?

jcarrivick
2016-07-27 01:48
@cbf: All good I figured it out, I was using my email address instead of my username haha

ghaskins
2016-07-27 01:58
@cbf: can you clarify one thing: when you go to the identity site above, it lets you do SSO through providers like github…but when you go to gerrit, it only seems to present username/password

ghaskins
2016-07-27 01:58
do you know if the SSO logins work or do we need an explicit LF account

cbf
2016-07-27 02:46
I think that we maintainers need an account @ry would know

ry
2016-07-27 03:01
@ghaskins: you will need an LFID. If you create it with the same email as you use for github, then you can use social logins

bgorman
2016-07-27 03:30
with this move to Gerrit, what is happening with issue tracking? Is it remaining on Github?

bgorman
2016-07-27 03:31
or does Gerrit do issue tracking and I just can't see it

ry
2016-07-27 03:34

bgorman
2016-07-27 03:44
ah, thanks :smiley:

bgorman
2016-07-27 03:47
are the github issues going to be ported across?

ry
2016-07-27 03:48
that is a question for cbf, he found a tool to do the porting but it seemed to pull in everything (pull requests as issues, for example) and I’ve been too busy to mess with it this week

ry
2016-07-27 03:48
I suspect the answer is “yes” but I can’t say when

bgorman
2016-07-27 03:55
ok, thanks again

grapebaba
2016-07-27 06:41
@cbf: Is it already available to use Gerrit or still need some time?

cbf
2016-07-27 08:45
I owe a post to outline how to transfer pull requests but Gerrit is all set to go

simon
2016-07-27 10:00
there is nothing in the repo

simon
2016-07-27 10:01
do we start from a clean slate? i'd like that

arnaud
2016-07-27 13:35
@simon, you must not be looking where you should

simon
2016-07-27 13:35
yes, i did not

junzhang
2016-07-27 18:08
has joined #fabric

camille
2016-07-27 21:01
has joined #fabric

cbruguera
2016-07-27 23:02
Will it work if I just `git remote add` the new repository at Gerrit to my existing local Fabric repo and make further pulls from it? (not needing to clone anything)

cbruguera
2016-07-27 23:11
...Or maybe it's recommended to clone, since the paths will be different? (no more `$GOPATH\src\http://github.com` ?)

cbruguera
2016-07-27 23:30
Did anyone check this out, by the way? http://gerrithub.io/

ray
2016-07-27 23:32
Since we migrated to Gerrit, will the old repo on GitHub acting as a mirror repo (i.e. further commits will still be synced to GitHub) ? Or it won't be updated anymore?

ray
2016-07-27 23:34
> The GH fabric repo will remain in read-only mode until we establish the mirror from Gerrit. We will preserve the current state of the hyperledger/fabric repo (and all subsequent transitioned repositories) for posterity at a location TBD (likely something like 'hyperledger-archive' org on GH). Oh I see.

ry
2016-07-28 00:26
@ray: there will need to be a distinct mirror from Gerrit to Github, because they don't share a common commit

ry
2016-07-28 00:27
I don't know if we will set the mirrors up under the same org or not. Everything is up in the air

ray
2016-07-28 00:36
@ry: Got it. Thanks :slightly_smiling_face:

somii1.01
2016-07-28 06:19
has joined #fabric

simon
2016-07-28 10:30
ry: if we don't mirror, we will have to change the package name

franklin
2016-07-28 16:16
has joined #fabric

ghaskins
2016-07-28 16:33
@cbf @ry so what is the policy/process now for merging patches?

ghaskins
2016-07-28 16:33
For instance, I just reviewed https://gerrit.hyperledger.org/r/#/c/291/

ghaskins
2016-07-28 16:33
I have a “submit” button, does this mean its ok to go?

ghaskins
2016-07-28 16:34
is there some other policy, etc?

cbf
2016-07-28 16:34
right NOW, the enforcement is basically one +2 by other than OP

cbf
2016-07-28 16:34
I have asked @ry to look into 2+2 NYOC (not your own code)

ghaskins
2016-07-28 16:34
ok, right now we have two +2s but I know we had a bunch of +1s in the GH thread

ghaskins
2016-07-28 16:34
(I know you wanted quorum on this one)

cbf
2016-07-28 16:35
we could do socially 2+2 until he can find the rule

ghaskins
2016-07-28 16:35
ok, that sounds good to me

ghaskins
2016-07-28 16:35
after all, we did fine with the relative lax GH environment (no self-commit abuse)

ghaskins
2016-07-28 16:35
so, social rules are fine for now

ghaskins
2016-07-28 16:35
(IMO)

cbf
2016-07-28 16:35
on the maintainer policy one (and any others that affect maintainer policy), I would like super majority of maintainers

cbf
2016-07-28 16:36
yes, I agree

ghaskins
2016-07-28 16:36
ok..i think we have it OOB, but not within gerrit

ghaskins
2016-07-28 16:36
ill hold off for now

cbf
2016-07-28 16:36
WDYT about the 2+2

cbf
2016-07-28 16:36
?

ghaskins
2016-07-28 16:36
Policy wise, I think it makes sense

ghaskins
2016-07-28 16:36
bandwidth wise, I think we are already strapped

cbf
2016-07-28 16:36
+2

cbf
2016-07-28 16:36
yeah, agree

cbf
2016-07-28 16:36
but we just added 4

ghaskins
2016-07-28 16:36
but that should hopefully improve with you and @hgabor et al

cbf
2016-07-28 16:36
so we are 8 now

ghaskins
2016-07-28 16:36
right

ghaskins
2016-07-28 16:37
so, its probably fine

ghaskins
2016-07-28 16:37
i say, go for social 2+2, if its painful, we can revisit

cbf
2016-07-28 16:37
we could do a social approach and major changes require 2+2

cbf
2016-07-28 16:37
or that

ghaskins
2016-07-28 16:38
yeah, that sounds good

ghaskins
2016-07-28 16:38
so, maintainer rule change, big change, social 2+2

cbf
2016-07-28 16:38
we could recommend that if the patch seems significant, add another reviewer

ghaskins
2016-07-28 16:38
trivial change, single non-op +2 good?

cbf
2016-07-28 16:38
+2

ghaskins
2016-07-28 16:38
cool, any one else have a thought?

cbf
2016-07-28 16:38
non-op is enforced

ghaskins
2016-07-28 16:39
right, thats nice

ghaskins
2016-07-28 16:39
not that anyone has or is expected to violate, but if for anything, to prevent accidents

ghaskins
2016-07-28 16:39
(it was too easy to leave a git-remote in GH)

ghaskins
2016-07-28 16:40
I would out of habit replace all my git:// remotes with https:// for that reason

ghaskins
2016-07-28 16:40
(against upstream trees, i mean)

ghaskins
2016-07-28 16:40
too easy for a stray unqualified “git push” to do damage, heh

ghaskins
2016-07-28 16:41
I feel reasonably confident merging 291 because the GH PR had a quorum of effective +2s already

ghaskins
2016-07-28 16:41
or should I wait?

cbf
2016-07-28 16:42
I agree, I don’t recall any dissent

ghaskins
2016-07-28 16:46
@ghaskins uploaded a file: https://hyperledgerproject.slack.com/files/ghaskins/F1W3TFKL0/screen_shot_2016-07-28_at_12.46.24_pm.png and commented: Is this effectively sending me email for all categories?

ghaskins
2016-07-28 16:47
or is that exclusively for deleting the row?

ghaskins
2016-07-28 16:52
it seems its just for deleting

ry
2016-07-28 16:55
@ghaskins: if you know prolog I could use a hand writing the 2+2 NYOC rules

ghaskins
2016-07-28 16:55
heh, I am relatively multilingual, but that is not one of them sorry

ghaskins
2016-07-28 17:16
@cbf @sheehan @muralisr We keep running into this: https://github.com/hyperledger/fabric/issues/2336#issuecomment-235955725

ghaskins
2016-07-28 17:17
The fundamental problem is people are now trying to use fabric in a pure docker environment (as opposed to building from source) but we arent ready to support that

ghaskins
2016-07-28 17:17
i have some ideas on what we need to do to get there, some of which I noted in the thread

grapebaba
2016-07-29 02:44
@dinghaiyang84:

joseph
2016-07-29 10:11
Hi,

joseph
2016-07-29 10:12
Do you know how to create a sigma/ proof of identity using sdk/node or hfc?

ghaskins
2016-07-29 13:34
@cbf @ry one potential wrinkle with the current gerrit setup; go imports

ghaskins
2016-07-29 13:34
do we have a plan here?

ghaskins
2016-07-29 13:35
for instance “import ‘http://github.com/hyperledger/fabric'” has support for gotool to translate to https://github.com/hyperledger/fabric

ghaskins
2016-07-29 13:36
but not sure what that would look like now from http://gerrit.hyperledger.org/r/fabric

ghaskins
2016-07-29 13:37
does this mean all imports need to be refactored accordingly? does gotool support arbitrary URLs? Perhaps the github mirror will be utiliized such that we don’t need to change?

cbf
2016-07-29 13:47
I was thinking the mirror, yes

cbf
2016-07-29 13:47
I don’t know whether go can handle gerrit

cbf
2016-07-29 13:47
er gerrit gits

ghaskins
2016-07-29 13:47
yeah, it seems that the mirror is at least a good stopgap until we can figure thatout

ghaskins
2016-07-29 13:48
i have a sneaking suspicion that it might work with any path, though the gerrit one is a little ugly

ghaskins
2016-07-29 13:48

ghaskins
2016-07-29 13:49
not sure we can do anything about that

cbf
2016-07-29 13:49
so, we need to 1) create an hyperledger-archives org 2) move hyperledger/fabric to hyperledger-archives/fabric and 3) mirror http://gerrit.hyperledger.org/r/fabric to hyperledger/fabric

ghaskins
2016-07-29 13:49
sounds reasonable

cbf
2016-07-29 13:50
and add the relevant README updates

ghaskins
2016-07-29 13:50
i wonder if the “/r/“ can be remapped

ghaskins
2016-07-29 13:50
thats really the only part that looks odd

cbf
2016-07-29 13:50
dunno

cbf
2016-07-29 13:51
but my point was does go have an ability to map http://gerrit.org.com/r/repo to actually fulfilling the git magic

cbf
2016-07-29 13:51
I don’t think so

ghaskins
2016-07-29 13:52
oh i see what you mean

ghaskins
2016-07-29 13:52
yeah, that I dont know

ghaskins
2016-07-29 13:52
i was assuming it was a standard git compatible url, but perhaps not

cbf
2016-07-29 13:52
right, it has some built in rule/assumptions as to what go get http://github.com/whatevs means

ghaskins
2016-07-29 13:52
actually, it should be, that is the URL that gerrit hands out for cloning

cbf
2016-07-29 13:52
let me try

ghaskins
2016-07-29 13:53
oh wait, i completely misunderstood you above

ghaskins
2016-07-29 13:53
i thought you were wondering if the /r thing was a real gerrit URL or synthesized

ghaskins
2016-07-29 13:53
i see now you are talking about the gotool mapping


ghaskins
2016-07-29 13:53
.org

cbf
2016-07-29 13:54
oops

ghaskins
2016-07-29 13:54
the fact that it hit a TCP DNS lookup error is promising


cbf
2016-07-29 13:54
go import meta tags

cbf
2016-07-29 13:54
hmmm

ghaskins
2016-07-29 13:54
hmm, wonder what that is

cbf
2016-07-29 13:54
maybe there’s some special sauce


ghaskins
2016-07-29 13:56
not sure we have access to the http engine under gerrit

ghaskins
2016-07-29 13:56
but if its served over something like apache or nginx, should be trivial


cbf
2016-07-29 13:57
yes

cbf
2016-07-29 13:59
they actually have a gerrit example

cbf
2016-07-29 13:59
<meta name="go-import" content="example.org git https://code.org/r/p/exproj">

ghaskins
2016-07-29 13:59
perfect

cbf
2016-07-29 14:00

ghaskins
2016-07-29 14:00
my guess is @ry et. al. have this running under apache, but thats just a guess

ghaskins
2016-07-29 14:00
if so, I would imagine this can be configured fairly easily

cbf
2016-07-29 14:00
that would make the path much less convoluted

ghaskins
2016-07-29 14:01
that has my vote as the most desirable outcome

cbf
2016-07-29 14:01
eg $GOPATH/src/hyperledger/fabric instead of $GOPATH/src/github.com/hyperledger/fabric

ghaskins
2016-07-29 14:02

cbf
2016-07-29 14:02
yes

cbf
2016-07-29 14:02
what I meant

ghaskins
2016-07-29 14:02
i think that reads nicely

ghaskins
2016-07-29 14:02
understood

cbf
2016-07-29 14:02
we can host a page there that could be the http://cbf-fabric-docs.readthedocs.io/en/latest/

ghaskins
2016-07-29 14:03
my assumption is this is a golang specific thing, so the sawtooth, etc, folks don’t need to have similar considerations

cbf
2016-07-29 14:03
right

ghaskins
2016-07-29 14:04
but good to know in general

ghaskins
2016-07-29 14:04
I assume we are going to move GH::Issues to JIRA or something at some point?

cbf
2016-07-29 14:04
but it also suggests that we start to federate the child repos from the main fabric repo

cbf
2016-07-29 14:04
eg add a section to README that basically lists the related projects

ghaskins
2016-07-29 14:05
i assume you mean like -api and -chaintool

cbf
2016-07-29 14:05
and integrate the docs for those into the main fabric doc tree

cbf
2016-07-29 14:05
yes

ghaskins
2016-07-29 14:05
yeah, that sounds good

ghaskins
2016-07-29 14:05
the last thing to consider, i’ve been using the GH::Releases facility

cbf
2016-07-29 14:06
ok, going to write this up

ghaskins
2016-07-29 14:06
if I moved -chaintool to gerrit, i lose that

ghaskins
2016-07-29 14:06
any thoughts on how to handle?

cbf
2016-07-29 14:06
unfamiliar with that

cbf
2016-07-29 14:06
looking

ghaskins
2016-07-29 14:06
well, fundamentally its about git tagging


ghaskins
2016-07-29 14:06
but GH has a value add on top where you can attach artifacts

ghaskins
2016-07-29 14:07

ghaskins
2016-07-29 14:07
which is particularly convenient for a JVM payload since its $arch neutral

ghaskins
2016-07-29 14:07
I can just have users wget that link and be up and running

cbf
2016-07-29 14:07
and we can’t translate that to gerrit/git

cbf
2016-07-29 14:07
?

ghaskins
2016-07-29 14:07
so, the tagging part should be universal in git, including gerrit

cbf
2016-07-29 14:08
yes

ghaskins
2016-07-29 14:08
but as far as where the artifact hosting might reside, its unclear

ghaskins
2016-07-29 14:08
(perhaps we can’t/don’t-want-to, and then I just need to use a different strategy

cbf
2016-07-29 14:08
LF has object storage

cbf
2016-07-29 14:09
for build/release artefacts

ghaskins
2016-07-29 14:09
ok, that might work

ghaskins
2016-07-29 14:09
i suspect it wont be as turnkey as the GH::Releases thing, but se la vie

cbf
2016-07-29 14:09
so there’s a tool that builds the release notes and puts artefacts somewhere in gh?

ghaskins
2016-07-29 14:10
no, that part is still manual

cbf
2016-07-29 14:10
we can automate;-)

ghaskins
2016-07-29 14:10
(actually, i shouldnt say “no"

ghaskins
2016-07-29 14:10
rather, I am not sure, so I do it manually

cbf
2016-07-29 14:10
I like the format

ghaskins
2016-07-29 14:10
yeah, this is true…jenkins or whatever could promote release artifacts to a repo for us

ghaskins
2016-07-29 14:10
that would be even better than what we have now actually

cbf
2016-07-29 14:11
is there a way to include release notes culled (and curated) from the git log?

ghaskins
2016-07-29 14:11
my experience is, its all in how creative the CI admin is

ghaskins
2016-07-29 14:11
generally, yes

cbf
2016-07-29 14:11
<--

ghaskins
2016-07-29 14:12
were you asking about automation from GH::Releases ?

cbf
2016-07-29 14:12
w/r/t 0.5-developer-preview, we can leave that where it is, no?

cbf
2016-07-29 14:13
yes

ghaskins
2016-07-29 14:13
i am not aware of that, I just get a chance to write one each time I create a release

ghaskins
2016-07-29 14:13
but from Jenkins, I think we could automate it easily

ghaskins
2016-07-29 14:14
obviously if the maintainers/contributors dont do anything special like curate a release-notes.txt, the info available to automate is more limited

ghaskins
2016-07-29 14:14
like git-log output (which is still helpful IMO)

ghaskins
2016-07-29 14:15
but its generally better if there is someone making intelligent release notes as part of release management, and then jenkins can just react to that

ghaskins
2016-07-29 14:20
w.r.t. preview branch, are you thinking we just leave it in the RO GH tree?

ghaskins
2016-07-29 14:22
stepping out for a run, bbiab

sheehan
2016-07-29 14:27
@cbf: A question @hgabor and I had for those of us new to Gerrit. If we’re reviewing a change, and we add comments that need addressing, but in general the change looks good, how do we vote or do we wait to vote?

cbf
2016-07-29 14:28
you can +1, 0 or -1 depending on how warm or cold you are to merging

sheehan
2016-07-29 14:28
thanks

cbf
2016-07-29 14:29
using a +2 with comments could just be “next time, don’t do X, but we’ll let it slide this time"

cbf
2016-07-29 14:29
-2 is a veto

cbf
2016-07-29 14:30
so even if someone +2 ed (pretty sure we have that set up)

hgabor
2016-07-29 14:30
has joined #fabric

hgabor
2016-07-29 14:39
@cbf yes we have

simon
2016-07-29 14:50
don't let things slide

jzhang
2016-07-29 20:54
@diego_m: when trying to use stub.VerifyAttribute() to verify a “role” attribute, I’m getting the following error: [asset_mgm] ERRO : system error Failed retrieving extension. through dlv debug it was returned from core/crypto/primitives/x509.go:135. what does this error mean and how to fix it?

sergeylykke
2016-07-29 21:59
has joined #fabric

diego_m
2016-07-29 22:26
@jzhang: from the error I think it means the TCert used for that transaction doesn’t have that attribute included

diego_m
2016-07-29 22:27
could you tell me how did you generate the TCert and confirm is the role attribute is included on it?

hisham.ads
2016-07-30 01:05
has joined #fabric

baohua
2016-07-30 13:46
@sheehan: @ghaskins @cbf About the gerrit review voting, i guess we can have a good reference from what the OpenStack project does: http://docs.openstack.org/infra/manual/developers.html I have contributed to it in past 3+ years, and feel the process is very robust/efficient :grinning:

jzhang
2016-07-30 15:32
@diego_m: thanks for the prompt response, I didn’t explicitly generate the TCert for the transaction submitter, I simply logged in from CLI (peer network login assigner), in membersrvc.yml the “assigner” ID has an attribute entry like this: `attribute-entry-11: assigner;bank_a;role;assigner;2015-01-01T00:00:00-03:00;;`. would it not get included in the TCert when this ID submits a transaction from CLI (or REST API for that matter)?

ynamiki
2016-08-01 05:18
has joined #fabric

kunal
2016-08-01 09:03
has joined #fabric

sieradzs
2016-08-01 12:00
has joined #fabric

diego_m
2016-08-01 16:38
@jzhang: yes, the assigner ID should have the role attribute, the only thing I can think of to cause that error is that probably you have old TCerts from a previous run for that ID.

jzhang
2016-08-01 16:39
so should I try rm -f /var/hyperledger/production then restart the network?

diego_m
2016-08-01 17:00
@jzhang: yes, let me know if that work

ckeyer
2016-08-01 17:12
has joined #fabric

jzhang
2016-08-01 18:17
@diego_m: still getting the same error after stopping the membersrvc, stopping peer, deleting the /production, restarting membersrvc and restarting peer (using —peer-chaincodedev as before): error in peer node console log: `[chaincode] processStream -> ERRO 75b Got error: user is not aurthorized to assign assets: must be in role ‘assigner’` error in chaincode console log: ``` 18:14:10.089 [asset_mgm] DEBU : ********************************Invoke**************************************** 18:14:10.090 [asset_mgm] DEBU : +++++++++++++++++++++++++++++++++++assignOwnership+++++++++++++++++++++++++++++++++ 18:14:10.104 [asset_mgm] ERRO : system error Failed retrieving extension. ```

jzhang
2016-08-01 18:19
and I did a `peer network login assigner` before deploying the chaincode `mycc`

diego_m
2016-08-01 18:19
I see, the other thing that could happen is that the aca is disabled in membersrvc.yaml

jzhang
2016-08-01 18:19
let me double check that

diego_m
2016-08-01 18:19
can you open that file, go to the aca section and check if the enable flag is set to true?

jzhang
2016-08-01 18:20
shoot, you are absolutely right, was “false” :wink:

diego_m
2016-08-01 18:20
:smile:

diego_m
2016-08-01 18:21
ok, you need to enable it and delete the production folder again

diego_m
2016-08-01 18:21
because now you have tcerts without that role

diego_m
2016-08-01 18:21
is the same rm you did before

jzhang
2016-08-01 18:21
for my credit :wink: I did check the console log which had `INFO: 2016/08/01 18:06:57 ACA services started`

jzhang
2016-08-01 18:22
i think the log message should be made more clear?

diego_m
2016-08-01 18:22
you are right

diego_m
2016-08-01 18:23
could you open an issue for that?

diego_m
2016-08-01 18:23
also you can take a look at this document for more details about the ACA and attribtues


jzhang
2016-08-01 18:27
will do

jzhang
2016-08-01 18:45
@diego_m: still no cigar, even tried to rebuild the membersrvc (make membersrvc) after modifying aca.enabled in membersrvc.yml, same error still

diego_m
2016-08-01 18:50
ok, just as a recap

diego_m
2016-08-01 18:51
you are trying to login with user assigner, get a TCert with the role attribute and invoke a chaincode function that verifies that attribute

diego_m
2016-08-01 18:51
right?

jzhang
2016-08-01 18:52
not sure what “get a TCert” entails, but here’s the series of commands I’m using: ``` peer network login assigner CORE_SECURITY_ENABLED=true CORE_SECURITY_PRIVACY=true peer chaincode deploy -n mycc -c '{"Function":"init", "Args": []}' -u assigner CORE_SECURITY_ENABLED=true CORE_SECURITY_PRIVACY=true peer chaincode invoke -n mycc -c '{"Function":"assignOwnership", "Args": ["-----BEGIN+CERTIFICATE——blahblah-----END+CERTIFICATE-----%0A","account1","100"]}' -u assigner ```

diego_m
2016-08-01 18:53
I see

diego_m
2016-08-01 18:53
ok, when you deploy, invoke or query TCerts are requested automatically if needed

diego_m
2016-08-01 18:54
if you want an attribute to be included in the TCerts you need to specify the attribute name during deploy, invoke or query

diego_m
2016-08-01 18:54
let me show you how

jzhang
2016-08-01 18:54
ah ok, that must be what i’m missing


diego_m
2016-08-01 18:55
that is part of the documentation I sent to you, in particular the line you need is:

diego_m
2016-08-01 18:55
(from that section)

diego_m
2016-08-01 18:55
./peer chaincode invoke -u userName -n mycc -c '{"Function":"increment", "Args": []}' -a ‘["role", "company"]'

diego_m
2016-08-01 18:55
there the user is invoking with attributes role and company, so it will get back TCerts with those attributes

diego_m
2016-08-01 18:56
it is the same for deploy, just pass -a ‘["role"]'

diego_m
2016-08-01 18:56
in your case

diego_m
2016-08-01 18:56
but again, you need to delete the old TCerts first

diego_m
2016-08-01 18:56
sorry, my mistake

diego_m
2016-08-01 18:56
you don’t need to delete the old TCerts

diego_m
2016-08-01 18:56
since you are now requesting TCerts with the attribute you will get new ones

jzhang
2016-08-01 18:59
that’s it! after adding the “-a” switch i got past that error. thanks @diego_m ! sorry for missing that in the doc :wink:

diego_m
2016-08-01 18:59
you are welcome!

damien
2016-08-01 21:44
has joined #fabric

szlaci83
2016-08-01 22:01
has joined #fabric

yasirmemon
2016-08-02 01:24
has joined #fabric

james.buckett
2016-08-02 04:00
Hello HLP I have a question about chain code in a fail over scenario

james.buckett
2016-08-02 04:00
If i have four VP with chain code deployed

james.buckett
2016-08-02 04:00
and i lose one of the VP's

james.buckett
2016-08-02 04:00
I start a new VP

james.buckett
2016-08-02 04:00
how does the new VP get a copy of the chain code

jcarrivick
2016-08-02 04:03
@james.buckett: My understanding is that it should get distributed as part of the blockchain when the new VP connects to the network

jcarrivick
2016-08-02 04:04
Someone correct me if I'm wrong

bgorman
2016-08-02 04:05
I'm not sure you're allowed to have "new" peers join a network (if you set pbft N=4)

james.buckett
2016-08-02 04:05
If I have 4 VP and 1 dies

james.buckett
2016-08-02 04:05
and i start a new 1 then i am back at 4 again

bgorman
2016-08-02 04:05
do you mean new as in you lost the info on disk?

james.buckett
2016-08-02 04:06
correct

bgorman
2016-08-02 04:06
I have never had that work

baohua
2016-08-02 05:46
you should use the same name/id for the new starting vp node.

ankitkamra
2016-08-02 06:05
has joined #fabric

ankitkamra
2016-08-02 06:42
hi i have setup fabric network on my local while deploying chaincode i'm getting following error:- 06:33:54.102 [rest] Query -> ERRO 825 {"Error": "Querying Chaincode -- Error:Failed to launch chaincode spec(premature execution - chaincode (9bdfbf948ccf88b9c09b6e0674feb413e2673d52d07285d7efb28e6e0d4f0e7ea3732b99c78fbddd1a2ea49d895b0f1248a1c9a4bcb864721af8c382d6b79e3d) is being launched)"} can anyone please help me to resolve this problem ?

bgorman
2016-08-02 06:57
@ankitkamra: I take it you've waited a bit and retried?

ankitkamra
2016-08-02 06:58
@bgorman: yes i waited for chaincode deployment

ankitkamra
2016-08-02 06:58
in my peer logs it first shows chaincode deployed successfully

ankitkamra
2016-08-02 06:59
after then when i query it returns the above error message

bgorman
2016-08-02 06:59
I think the "deploy" is asynchronous, so it returns a success when there's really still things going on in the background

ankitkamra
2016-08-02 07:00
@bgorman: may be i am not sure i have waited for 4-5 mins

ankitkamra
2016-08-02 07:01
also i m getting following error:- 2016/08/03 06:51:59 grpc: Server.Serve failed to complete security handshake.

bgorman
2016-08-02 07:02
if you run `docker ps -a` can you see any chaincode containers like `dev-vp1-9bdfbf948ccf88b9c09b6e0674feb413e2673d52d07285d7efb28e6e0d4f0e7ea3732b99c78fbddd1a2ea49d895b0f1248a1c9a4bcb864721af8c382d6b79e3d`

ankitkamra
2016-08-02 07:03
i can see two peers but both are in exited state

ankitkamra
2016-08-02 07:04
two containers**

bgorman
2016-08-02 07:05
you can try `docker logs containerName` to see what they printed out

bgorman
2016-08-02 07:05
I'm guessing something bad happened during the deployment

ankitkamra
2016-08-02 07:06
yes there is following error:- Error starting Simple chaincode: %s Error trying to connect to local peer: grpc: timed out trying to connect

ankitkamra
2016-08-02 07:07
for peer2:- 2016/08/03 06:32:08 Peer address: 172.17.0.5:30303 2016/08/03 06:32:08 os.Args returns: [/opt/gopath/bin/9bdfbf948ccf88b9c09b6e0674feb413e2673d52d07285d7efb28e6e0d4f0e7ea3732b99c78fbddd1a2ea49d895b0f1248a1c9a4bcb864721af8c382d6b79e3d -peer.address=172.17.0.5:30303] 2016/08/03 06:32:08 Chaincode ID: 9bdfbf948ccf88b9c09b6e0674feb413e2673d52d07285d7efb28e6e0d4f0e7ea3732b99c78fbddd1a2ea49d895b0f1248a1c9a4bcb864721af8c382d6b79e3d 2016/08/03 06:32:08 transport: http2Client.notifyError got notified that the client transport was broken read tcp 172.17.0.1:39773->172.17.0.5:30303: read: connection reset by peer. 2016/08/03 06:32:08 transport: http2Client.notifyError got notified that the client transport was broken read tcp 172.17.0.1:39774->172.17.0.5:30303: read: connection reset by peer. 2016/08/03 06:32:08 transport: http2Client.notifyError got notified that the client transport was broken read tcp 172.17.0.1:39775->172.17.0.5:30303: read: connection reset by peer. 2016/08/03 06:32:08 grpc: ClientConn.transportMonitor exits due to: grpc: timed out trying to connect 2016/08/03 06:32:08 Registering.. sending REGISTER 2016/08/03 06:32:08 []Error sending REGISTER: rpc error: code = 13 desc = "transport: write tcp 172.17.0.1:39773->172.17.0.5:30303: use of closed network connection" 2016/08/03 06:32:08 Received error from server: rpc error: code = 13 desc = "transport is closing", ending chaincode stream Error starting Simple chaincode: %s rpc error: code = 13 desc = "transport is closing"

jonathanlevi
2016-08-02 07:12
BTW: @ankitkamra. We have changed the ports just a few hours ago.

jonathanlevi
2016-08-02 07:13
It's too late (locally for me it's past midnight) for me to take a closer look at this... but I have posted these:

rickystef
2016-08-02 07:14
has joined #fabric

jonathanlevi
2016-08-02 07:14
@jonathanlevi uploaded a file: https://hyperledgerproject.slack.com/files/jonathanlevi/F1X9R52MT/-.go and commented: Referring to Sheehan's email/notification.

jonathanlevi
2016-08-02 07:15
Can you please try to fetch the latest, rebuild your dev-environment, etc. ?

ankitkamra
2016-08-02 07:15
@jonathanlevi: i am running old fabric source code and able to telnet that ports

ankitkamra
2016-08-02 07:15
okay i will try fetching latest source code

jonathanlevi
2016-08-02 07:15
Yes, I can tell you are running an old version (e.g., 30303, ...)

jonathanlevi
2016-08-02 07:16
The new ports are listed at the top: https://gerrit.hyperledger.org/r/#/c/289

jonathanlevi
2016-08-02 07:16
Again, not sure whether this will solve the issue, but you might as well upgrade to the latest.

jonathanlevi
2016-08-02 07:16
(and we'll follow from there...)

matpasha
2016-08-02 07:16
has joined #fabric

ankitkamra
2016-08-02 07:17
@jonathanlevi: okay thanks :slightly_smiling_face:

matpasha
2016-08-02 07:19
Hi, I am running the fabric setup in 'outside vagrant" mode using docker toolbox on windows 7. I am able to get the peer and membersrvc up & running, but when I try to register the chain code using - CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:30303 ./chaincode_example02 I get the following error - 17:52:19.769 [shim] DEBU : Peer address: 0.0.0.0:30303 2016/08/01 17:52:20 grpc: ClientConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 0.0.0.0:30303: connectex: The requested address is not valid in its context."; Reconnecting to "0.0.0.0:30303" 2016/08/01 17:52:22 grpc: ClientConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 0.0.0.0:30303: connectex: The requested address is not valid in its context."; Reconnecting to "0.0.0.0:30303" 17:52:22.439 [shim] ERRO : Error trying to connect to local peer: grpc: timed out trying to connect Error starting Simple chaincode: Error trying to connect to local peer: grpc: timed out trying to connect Below is my docker-compose.yml file membersrvc: image: hyperledger/fabric-membersrvc command: membersrvc vp0: image: hyperledger/fabric-peer environment: - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=http://172.17.0.1:2375 - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_ID=vp0 - CORE_SECURITY_ENROLLID=test_vp0 - CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT links: - membersrvc command: sh -c "sleep 5; peer node start --peer-chaincodedev" PLEASE HELP! Any help is appreciated. Thanks, MATPASHA

bgorman
2016-08-02 07:39
@matpasha you seem to have the peer attempting to connect to the IP address 0.0.0.0 - I think you may want to check your address configurations

bgorman
2016-08-02 07:40
CORE_PEER_ADDRESS=0.0.0.0:30303 should be an addressable IP

bgorman
2016-08-02 07:40
not 0.0.0.0

bgorman
2016-08-02 07:41
usually for vp0 it'd be 172.17.0.2:30303 (although the new code has different ports)

matpasha
2016-08-02 07:42
@bgorman: Could you tell me how do i do that? FYI I tried the IP address of the fabric peer running on the same machine. I didn't work. Should I try I try the IP of membersrvc instead? Also the where is the port 30303 configured? Doesn't seem to be listed in docker-compose.yml.

bgorman
2016-08-02 07:44
you could try setting CORE_PEER_ADDRESSAUTODETECT=true

bgorman
2016-08-02 07:44
the CORE_PEER_ADDRESS should be whatever hostname/IP that other peers can route to

bgorman
2016-08-02 07:44
for the peer being deployed

matpasha
2016-08-02 07:45
- CORE_PEER_ADDRESSAUTODETECT=true is already there

bgorman
2016-08-02 07:46
so it is

bgorman
2016-08-02 07:46
why did it not pick a good IP for the peer address then? :confused:

bgorman
2016-08-02 07:47
oh wait it's your chaincode registering that isn't working

bgorman
2016-08-02 07:48
you need to point it to the peer's address

bgorman
2016-08-02 07:48
so (1) figure out the peer's IP

bgorman
2016-08-02 07:48
(2) set it in CORE_PEER_ADDRESS when you run the chaincode

matpasha
2016-08-02 07:49
Alright. Let me try that. Thanks in advance

matpasha
2016-08-02 07:54
@bgorman: Didnt work:slightly_frowning_face:

bgorman
2016-08-02 07:55
did it log that it was trying to connect to somewhere more useful than 0.0.0.0?

matpasha
2016-08-02 07:56
$ CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=172.17.0.2:30303 ./chaincode_ex ample02 13:23:13.586 [shim] DEBU : Peer address: 172.17.0.2:30303 13:23:16.587 [shim] ERRO : Error trying to connect to local peer: grpc: timed ou t trying to connect Error starting Simple chaincode: Error trying to connect to local peer: grpc: ti med out trying to connect This is the error I am getting!

bgorman
2016-08-02 07:59
have you checked that vp0 is actually at that address?

matpasha
2016-08-02 08:02
Yes. I did the following docker exec -it fabric_vp0_1 bash oot@abbc45868d48:/opt/gopath/src/github.com/hyperledger/fabric# ifconfig th0 Link encap:Ethernet HWaddr 02:42:ac:11:00:02 inet addr:172.17.0.2 Bcast:0.0.0.0 Mask:255.255.0.0 inet6 addr: fe80::42:acff:fe11:2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:16 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1296 (1.2 KB) TX bytes:648 (648.0 B) o Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) please correct me if I am wrong.

bgorman
2016-08-02 08:04
yeah that seems right

bgorman
2016-08-02 08:04
perhaps you have the new code and new ports?

matpasha
2016-08-02 08:05
Seems likely! But I am unable to figure out where the ports are configured.

bgorman
2016-08-02 08:05
try :7051 instead of :30303

matpasha
2016-08-02 08:09
$ CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=172.17.0.2:7051 ./chaincode_exa mple02 13:37:39.148 [shim] DEBU : Peer address: 172.17.0.2:7051 13:37:42.149 [shim] ERRO : Error trying to connect to local peer: grpc: timed ou t trying to connect Error starting Simple chaincode: Error trying to connect to local peer: grpc: ti med out trying to connect Didn't work :slightly_frowning_face:

bgorman
2016-08-02 08:17
sorry, I'm out of ideas and my vagrant VM is still being rebuilt

joseph
2016-08-02 08:37
Hi,

joseph
2016-08-02 08:38
When I register and enroll a user, I get an error: Signature verification failed

joseph
2016-08-02 08:39
Could someone give me an ideal about it?

nits7sid
2016-08-02 09:31
I am trying to use a chaincode listener but the listener is unable to get the events ..Is it because the transaction results object is removed from the blocks?

yajneshrai
2016-08-02 10:14
@nits7sid: yes even i got the same Issue.. Where does the events get logged in the ledger? and how do I listen for chaincode events.?

ankitkamra
2016-08-02 13:38
Hi i am facing issue while querying chaincode:- ledger: resource not found can anyone help me to resolve this problem ?

ghaskins
2016-08-02 14:02
@sheehan @cbf was just reviewing https://gerrit.hyperledger.org/r/#/c/373/

ghaskins
2016-08-02 14:03
it looks LGTM and we have 2+2 but I dont see a “merge” type button

ghaskins
2016-08-02 14:03
my assumption is because of the jenkins -1, but wanted to be sure I am not missing something

sheehan
2016-08-02 14:03
yeah, it’s because the build failed

ghaskins
2016-08-02 14:03
ok

ghaskins
2016-08-02 14:03
that makes sense

sheehan
2016-08-02 14:04
I believe you can log into Jenkins with the same credentials you use for Gerrit and restart the build

ghaskins
2016-08-02 14:04
i’ve only merged 1-2 other gerrit patches so I wasnt sure if I was just confused

sheehan
2016-08-02 14:04
I saw @grapebaba say that in a comment, but I haven’t tried restarting a build myself

ghaskins
2016-08-02 14:07
hmm, looks like all the builders are offline

ghaskins
2016-08-02 14:07
oh well, the patch is ready to go in once CI confirmation passes

ry
2016-08-02 16:31
ghaskins: the x86 builders are instantiated when you start the build

ghaskins
2016-08-02 16:31
oh, i tried to restart the build and thought it failed because there was nothing online

ghaskins
2016-08-02 16:31
i might have misinterpreted some other issue

ry
2016-08-02 16:32
looks like it worked (the one from about 90 minutes ago)

ghaskins
2016-08-02 16:32
ive used jenkins quite a bit in the past, but this setup is foreign to me

ghaskins
2016-08-02 16:32
heh, ok, must just be operator confusion then :wink:

ry
2016-08-02 16:32

ghaskins
2016-08-02 16:32
ok, cool, thanks for the heads up

ghaskins
2016-08-02 16:33
ill check the gerrit state and merge if applicable

lisacheng
2016-08-02 19:47
has joined #fabric

adamrichard
2016-08-03 06:22
has joined #fabric

gustav
2016-08-03 07:41
has joined #fabric

hgabor
2016-08-03 09:37
could anybody help me? I have a failing Jenkins test: https://jenkins.hyperledger.org/job/fabric-verify-x86_64/154/console It works on my laptop. (commit: https://gerrit.hyperledger.org/r/#/c/317/) How could I debug it?

baohua
2016-08-03 14:04
Sent a recheck for u. last time i met this msg, it was jenkins failure.

agafoor
2016-08-03 14:07
has joined #fabric

sheehan
2016-08-03 14:14
@muralisr: you may want to take a look as it’s saying http://github.com/hyperledger/fabric/core/chaincode failed

louisw
2016-08-03 16:54
has joined #fabric

james.buckett
2016-08-04 01:25
is anyone aware if there are hyperfabric images compiled for the ARM chip

james.buckett
2016-08-04 01:25
specifically if i want to run hyperledger on Raspberry Pi

baohua
2016-08-04 02:12
No currently. Think it should work. Look forward to see ur progress :slightly_smiling_face:

ansi
2016-08-04 14:45
has joined #fabric

jcarrivick
2016-08-05 01:56
I'm trying to perform REST queries against the `membersrvc` and it seems that no matter what I do I get mangled text back (`��`) and the log says bogus greeting: `2016/08/05 01:51:47 transport: http2Server.HandleStreams received bogus greeting from client: "GET /registrar/test_vp0 "`. I assume that I am required to log in some how but I cannot seem to figure out how. Is someone able to point me in the right direction/documentation please?

jonathanlevi
2016-08-05 05:24
Hi, sorry - I just saw this.

jonathanlevi
2016-08-05 05:26
[better to use the # channel for such questions, as some of us monitor these more frequently, but back to your question], can you share/describe how to reproduce this bogus greeting?

jcarrivick
2016-08-05 05:57
@jonathanlevi: thanks, I figured it out with @ghaskins - I was attempting to do rest against the grpc port!

ankaplan
2016-08-05 06:54
has joined #fabric

svengapski
2016-08-05 07:42
has joined #fabric

mariant
2016-08-05 07:45
has joined #fabric

voodoo
2016-08-05 10:26
Hi all I have a problem about chaincode in a fail over scenario If i have four VP with chaincode-example02 deployed (PBFT) Then i stop the VP3 and run the invoke at VP0 . After that ,i restart the VP3 and run another invoke. I find that the VP3 can’t sync the block (hold the block height 3 but the VP0 increase to block height 5) what’s the problem? Logs :.Replica 3 sending view-change, v:1, h:0, |C|:1, |P|:7, |Q|:7 Replica 1 received view-change from replica 3, v:1, h:0, |C|:1, |P|:7, |Q|:7. Replica 1 already has a view change message for view 1 from replica 3

lbonniot
2016-08-05 11:01
Hi @voodoo I read somewhere that peers re-connection is not handled yet by the fabric. Not sure, but it could explain why it's not working properly

simon
2016-08-05 11:36
@ibmdannywong: did you figure out your issue?

ibmdannywong
2016-08-05 11:36
has joined #fabric

matpasha
2016-08-05 11:39
Hi, I am trying to register the example chaincode on MAC using DOCKER I am getting the following error. MacBook-Pro:chaincode_example02 matpasha$ CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:30303 ./chaincode_example02 16:56:25.173 [shim] DEBU : Peer address: 0.0.0.0:30303 16:56:25.173 [shim] DEBU : os.Args returns: [./chaincode_example02] 16:56:25.173 [shim] DEBU : Registering.. sending REGISTER 2016/08/05 16:56:25 transport: http2Client.notifyError got notified that the client transport was broken EOF. 16:56:25.174 [shim] ERRO : Received error from server: rpc error: code = 13 desc = "transport is closing", ending chaincode stream Error starting Simple chaincode: rpc error: code = 13 desc = "transport is closing" Could anybody point out what am I missing?

simon
2016-08-05 11:39
firewall issue?

simon
2016-08-05 11:40
@voodoo: eventually the node will catch up

matpasha
2016-08-05 11:40
@simon: But I am running the member services on the same machine. How will firewall block it?

simon
2016-08-05 11:41
i don't know

simon
2016-08-05 11:41
look at the peer logs

muralisr
2016-08-05 12:11
@matpasha: are you running with the port changes ? try 7051 instead of 30303 ?

voodoo
2016-08-05 12:15
@voodoo pinned a message to this channel.

voodoo
2016-08-05 12:16
7051 right

voodoo
2016-08-05 13:15
How to solve this problem?Whatever i run the invoke twice or more at VP3(the error node),the key value keep uncorrect。How to sync the blockchain?

simon
2016-08-05 13:15
voodoo: what happens if you send more invokes?

simon
2016-08-05 13:16
do you use pbft or noops?

voodoo
2016-08-05 13:17
Block height could't increase yet at VP3(use pbft )

simon
2016-08-05 13:18
keep submitting invokes

voodoo
2016-08-05 13:21
I try to peer node stop and start ,again and again submit invoke 。Only the vp0 vp1 vp2 get correct value。The vp3 seems nothing happened

simon
2016-08-05 13:21
yes

simon
2016-08-05 13:21
that is expected

simon
2016-08-05 13:22
if you do pbft with n=4,f=1, one node will be a bit behind

voodoo
2016-08-05 13:24
You mean a time lag between four peers

simon
2016-08-05 13:24
the reason is this:

simon
2016-08-05 13:24
pbft with f=1 allows for one malicious node

voodoo
2016-08-05 13:24
How to force sync the state?

simon
2016-08-05 13:24
a malicious node could be one that is deliberately slow

simon
2016-08-05 13:25
so the network cannot wait for that one node to catch up

simon
2016-08-05 13:25
that node will be just a bit behind

simon
2016-08-05 13:25
if you run many transactions, you will not really notice it

voodoo
2016-08-05 13:27
ok ,i get your point 。

voodoo
2016-08-05 13:27
thx guy

simon
2016-08-05 13:27
there is an option to create periodic null requests

simon
2016-08-05 13:27
this is a way to have the node catch up, even if there are no other transactions taking place

voodoo
2016-08-05 13:28
which way i can test it

simon
2016-08-05 13:28
set the null request timeout in the pbft config.yaml

voodoo
2016-08-05 13:28
ok i will try it

simon
2016-08-05 13:28
but it really is just a workaround

simon
2016-08-05 13:28
with the new architecture we're working on, this will change

simon
2016-08-05 13:29
and nodes should catch up much more quickly

voodoo
2016-08-05 13:30
i'm looking forward to the new architecture

nkunkel
2016-08-05 18:08
Are there installation instructions for running Fabric on Ubuntu? The docs under /Setup on the repo only have instructions for Windows and OSX.

nkunkel
2016-08-05 18:21
Never mind, I think I found something suitable. Link for anyone else interested: https://github.com/harrijk/docs/blob/master/build-hyperledgerFabric-for-UBUNTU-linux-on-z.md

ankitkamra
2016-08-06 05:13
Hi i am getting following error:- ledger: ressource not found can anyone help me to resolve this problem ?

joseph
2016-08-06 15:02
Hi,

joseph
2016-08-06 15:02
I have a question.

joseph
2016-08-06 15:03
Is it possible if we create a timer on a chaincode and it will invoke the chaincode at a time?

garisingh
2016-08-06 18:42
@joseph - ^^^^ no this is not possible. you would have to create a client which invokes a transaction and use a timer for it

joseph
2016-08-07 09:46
@garisingh: thanks.

alexho
2016-08-07 15:49
has joined #fabric

matpasha
2016-08-08 04:31
@voodoo: @muralisr Changing to 7051 worked. Thanks :grinning:

voodoo
2016-08-08 04:35
@matpasha: already worked on port 7051,after committing enough invoke the block sync state is ok

ashnur
2016-08-08 09:06
where are these port changes? i also have 30303 and 30304 and 5000 used

ashnur
2016-08-08 09:07
also, why did you leave github?

pascalli
2016-08-08 12:19
has joined #fabric

pascalli
2016-08-08 12:26
Hello, I would like to test a new chaincode in debug mode by using eclipse, but when I start my chaincode I have the following error: 'shim CRIT: peer address not configured, can't connect to peer. So it's normal because I haven't configured this address, but I don't know where is the configuration file. thank you for your help.

garisingh
2016-08-08 12:45
@pascalli: the easiest thing is to pass `CORE_PEER_ADDRESS` as an environment variable when you start the chaincode

pascalli
2016-08-08 12:59
ok thanks I will try this: os.Setenv("CORE_PEER_ADDRESS", "127.0.0.1:5000")

pascalli
2016-08-08 13:47
it works now with : os.Setenv("CORE_PEER_ADDRESS", "127.0.0.1:30303")

sajz
2016-08-08 14:13
Hi there, Do you know how/where to fetch information about the network of peers (it's running locally in Vagrant) to put them in a user-friendly dashboard? For example : number of peers, number of transactions or blocks, number of invoke / query etc. The goal here is to bring more visibility on the blockchain side of a project through a dedicated interface, to show people how it works backstage. Thank you very much

ghaskins
2016-08-08 16:49
FYI: on holiday this week, availability spotty until I return 8/15

cbf
2016-08-08 18:50
@ashnur: @voodoo the patch that affected the port assignments was merged last week. An announcement posted here and on the mailing list

garisingh
2016-08-08 19:31
@ghaskins: they let you take vacations? :slightly_smiling_face:

bgorman
2016-08-09 02:52
@sajz you could fetch a lot of that info from the REST API: https://github.com/hyperledger/fabric/blob/f7d932108d1e339d3371b6e8e922d09ecf913e9a/docs/API/CoreAPI.md#rest-api I've also seen a nice-looking "Hyperledger Explorer" dashboard floating around, can't find the code though: https://vimeo.com/174814785 @konradpabjan may be able to link to the code for the Explorer

satheesh
2016-08-09 04:34

bgorman
2016-08-09 05:15
Thanks @satheesh. I'm bookmarking that for next time I want to use it :slightly_smiling_face:

voodoo
2016-08-09 05:17
@satheesh: nice release,It help us monitor the hyperledger running state

satheesh
2016-08-09 05:19
Thanks @bgorman and @voodoo .. More improvements planned for hyperledger explorer in the future

sajz
2016-08-09 09:18
Nice, thanks for the quick answer!

ashnur
2016-08-09 09:19
coming from http://hyperledger.org, there are no clear links to the fabric documentation. on the github page obviously no one will search anything after reading that it's abandoned. It's completely unclear how to do anything with fabric from the gerrit page, where there is a documentation link, but it leads elsewhere. I understand for those who are already in the loop gerrit is way better for the automation, and I have nothing against it, however I wish you could show me where should I click if I want to explore fabric APIs, and their documentation.


sajz
2016-08-09 09:19
You can try this link maybe

sajz
2016-08-09 09:20
Part 6

ashnur
2016-08-09 09:20
sajz, thanks, but maybe you misunderstand my point. I am curious where I can find that link if I am on the http://hyperledger.org main page.

sajz
2016-08-09 09:20
Ah that's very true, it took me a while to gather all the links

sajz
2016-08-09 09:20
Not very "user-friendly" for a beginner

ashnur
2016-08-09 09:21
i think that page, with all the docs and the protocol description should be one of the biggest largest link somewhere.

ashnur
2016-08-09 09:22
also, the search still doesn't work in it, so it's literally terrible, and one must question if it's even up to date.

sajz
2016-08-09 09:22
I have a doubt : on the blockchain nothing is deleted, but with the hyperledger protocol and with fabric, if I want to "update" a table of users, for example delete a user or modify an attribute (age or something), am I really "modifying" or "deleting" the data ? from a storage point of view what is happening ?

ashnur
2016-08-09 09:22
sajz have you heard of datomic?

sajz
2016-08-09 09:22
not at all

ashnur
2016-08-09 09:23
it's easier to understand the idea through that concept because it's not distributed :slightly_smiling_face:

ashnur
2016-08-09 09:23
at least that's how i think about it.

ashnur
2016-08-09 09:26
basically, I separate the low level part which you call "storage" from the conceptually important things that are stored. this way the storage is just a transaction log, but the filtered view on the top of it can be an arbitrarily complex database

ashnur
2016-08-09 09:26
so no, it doesn't get deleted, but you can hide it

ashnur
2016-08-09 09:27
and those who use an app, that uses the blockchain, doesn't have to deal with this problem at all

ashnur
2016-08-09 09:27
sry if i overexplained, i do that a lot :disappointed:

sajz
2016-08-09 09:51
No actually it's a (much clearer) confirmation of what I was thinking so thanks. Now even if you have two layers, let's say a low level layer with the log of all tx and the high level layer with the data that is displayed, can you still keep a link between the two? Say the user of the app ask for a temperature and he gets an answer. That answer is stored high level in my chaincode table (if I am not mistaking?) and is displayed on the interface by the proper function I made. Now can I know where the same information (temperature) is stored in the low level blockchain ? Can I find a "proof". Can I find the block number or the specific transaction that corresponds to that Query ? With timestamp and content.

ashnur
2016-08-09 09:51
ok, so the docs says this: "A transaction is always associated with a chaincode specification which defines the chaincode and the execution environment such as language and security context. Currently there is an implementation that uses Golang for writing chaincode. Other languages may be added in the future."

ashnur
2016-08-09 09:51
how to know what is required for chaincode to be implemented in another language? Go is causing me problems.

ashnur
2016-08-09 09:55
sajz: absolutely. even more, what I think might end up happening in a lot of cases that you don't actually store the information on the blockchain, just the proof of it. this way you don't have to share it. zero knowledge proofs take this to the extremes :slightly_smiling_face:.

sajz
2016-08-09 09:57
Right ! I am actually working on privacy mecanisms for healthcare (works for other fields too) so I agree with this view. It's also a way to (try to) keep the size of the ledger reasonable


sajz
2016-08-09 10:01
The thing is do we have a way (dev tool like an API) to fetch this proof? The only thing I found in Fabric is something called the logger. I was thinking of a function that allows you to "search" the ledger with criterias like: which chaincode are you looking at or from which address (or certificate) was the tx issued etc

ashnur
2016-08-09 10:02
this is the segment that goes into this> 4.2.2 Expiration and revocation of certificates

ashnur
2016-08-09 10:09
i think on ethereum for example you can't even hide things because there is nothing similar to the membership services?

sajz
2016-08-09 10:10
No membership and no CA but you can hide with a boolean the information you want the smart contract to discard

ashnur
2016-08-09 10:10
oh, hackish :smile:

sajz
2016-08-09 10:12
Yep!

sajz
2016-08-09 10:18
I am gonna spend the next five hours looking at Hyperledger so if there are some useful links, projects or videos that people here can share I will be happy to read/watch. :slightly_smiling_face: @satheesh: Thanks for the explorer, I may have few questions. :)

abastys
2016-08-09 10:19
has joined #fabric

sajz
2016-08-09 11:12
Does someone have a clear definition of what is SHIM ?

sajz
2016-08-09 11:29
After few hours, I found this, but still not very clear : https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim "Package shim provides APIs for the chaincode to access its state variables, transaction context and call other chaincodes. " So SHIM enables persistency of the data used by the CC?

pascalli
2016-08-09 11:31
Hello, did someone already developed a unit test to test query and invok methods in chain code ?

hgabor
2016-08-09 11:41
I guess there are such unit tests in core/chaincode

cbf
2016-08-09 12:20
@ashnur: agree with the feedback on the accessibility of the docs etc…

cbf
2016-08-09 12:21
thanks - we’re working on making things more accessible

ashnur
2016-08-09 12:22
np, I know that the pace you are working on these things, it's probably a bit of juggling with resources to make every part of the repo consistent with each other

ashnur
2016-08-09 12:23
cbf: can you maybe give some information regarding my question about how up to date the documentation is? for example I would expect one docs for the v0.5 developer preview, and another for the master branch.

cbf
2016-08-09 12:23
the docs reflect master

ashnur
2016-08-09 12:24
i see, that's great too

cbf
2016-08-09 12:25
if you want to fork the v0.5-developer-preview branch you can generate the docs by getting an account and adding your fork to http://readthedocs.org

ashnur
2016-08-09 12:26
oh right, is there some way i could help you making the docs searchable, that's a big issue because it's not a single page

cbf
2016-08-09 12:26
as we get more mature in our processes, we’ll have versions of the docs pertinent to major releases

cbf
2016-08-09 12:26
I believe that the docs should be searchable

ashnur
2016-08-09 12:26
it definitely isn't and it never was :slightly_smiling_face:

ashnur
2016-08-09 12:27
well, never is a harsh word, but not in the past several weeks

ashnur
2016-08-09 12:28
well, i am wrong again, it somewhat works, but when I search it shows no results and i had to realize that i have to click "Projects" to see search result...

ashnur
2016-08-09 12:29
and the results do not contain enough information to be enough for judging if it's relevant or not, 4 words is nothing

ashnur
2016-08-09 12:31
and of course most of what is found is not related to hyperledger project at all..

cbf
2016-08-09 12:31
huh

cbf
2016-08-09 12:31
I just checked… seems to be readthedocs search isn’t functioning

ashnur
2016-08-09 12:32
ok, so we both see the same thing :slightly_smiling_face:.

cbf
2016-08-09 12:33
yes

cbf
2016-08-09 12:33
not good;-)

ashnur
2016-08-09 12:36
github was good because of this, because there one could search and see what is what. i am not yet familiar enough with gerrit to find the same things there too

cbf
2016-08-09 12:37
yeah, I am just back from vacation, but following the migration for SCM to Gerrit, we need to complete things by mirroring to GH in R/O mode

cbf
2016-08-09 12:37
I hope to have that done this week

cealdi
2016-08-09 12:37
has joined #fabric

cbf
2016-08-09 12:37
I need to look into the readthedocs search issue

cbf
2016-08-09 12:38
I don’t see anything special needs to be done to enable search - they are supposed to index all hosted docs (including our own)


cbf
2016-08-09 12:39
@joshhus: @nickgaski could one of you please look into why search in readthedocs is not working for the fabric project? Thanks!

joshhus
2016-08-09 12:39
has joined #fabric

ashnur
2016-08-09 12:40
i never liked read the docs

nickgaski
2016-08-09 12:41
weird. yep I'll do it with Ramesh today

ashnur
2016-08-09 12:42
i searched for search in their issue list and there are 2 pages of results with OPEN issues

cbf
2016-08-09 12:42
oh weird


cbf
2016-08-09 12:42
that works

cbf
2016-08-09 12:43
@nickgaski: thanks!

ashnur
2016-08-09 12:43
that works after a couple of seconds

cbf
2016-08-09 12:43
yes

ashnur
2016-08-09 12:43
thank you! :slightly_smiling_face:

nickgaski
2016-08-09 14:02
Ramesh has a new process that seems to be hunky dory. Issue #2347 in hyperledger/fabric. Just need to decide on a new domain name @cbf. Not sure why you have to add 'search.html' to the previous URL in order for it to work. #readthedocsproblems

davisbroda
2016-08-09 14:07
has joined #fabric

davisbroda
2016-08-09 14:11
I've been trying to use the new code from gerrit, and have been getting the following error message when trying to turn on the peer, shortly followed by it exiting with status 2. ```# http://github.com/hyperledger/fabric/vendor/github.com/Sirupsen/logrus src/github.com/hyperledger/fabric/vendor/github.com/Sirupsen/logrus/terminal_darwin.go:10: ioctlReadTermios redeclared in this block previous declaration at src/github.com/hyperledger/fabric/vendor/github.com/Sirupsen/logrus/terminal_bsd.go:7 src/github.com/hyperledger/fabric/vendor/github.com/Sirupsen/logrus/terminal_darwin.go:12: Termios redeclared in this block previous declaration at src/github.com/hyperledger/fabric/vendor/github.com/Sirupsen/logrus/terminal_bsd.go:9 # http://github.com/hyperledger/fabric/vendor/github.com/tecbot/gorocksdb ld: warning: directory not found for option '-LCELLAR/rocksdb/4.4/lib' ld: warning: directory not found for option '-LCELLAR//snappy/1.1.3/lib' ld: warning: directory not found for option '-LCELLAR/lz4/r131/lib/'``` The last few lines (directory not found) repeats four times. However this always popped up before the update to the new code, and never stopped the peer from operating, so I suspect the problem is on the first part of the error message, about repeated declarations. Does anyone have any idea why this is happening, and how I can fix it?


cbf
2016-08-09 14:18
was recently landed

cbf
2016-08-09 14:18
updated the vendored dependencies for docker

cbf
2016-08-09 14:19
did you build a development environment from scratch?

davisbroda
2016-08-09 14:20
Basically built from scratch

davisbroda
2016-08-09 14:20
or close enough to it.

cbf
2016-08-09 14:20
let me see if I can replicate

davisbroda
2016-08-09 14:20
If dependancies were updated, then I assume that I have to update something on my end to get it to work properly. Any idea what needs to be updated?

cbf
2016-08-09 14:22
you should be able to simply ‘git pull origin master’ to get the latest

cbf
2016-08-09 14:22
I have just done that and am building

cbf
2016-08-09 14:22
u on a mac?

davisbroda
2016-08-09 14:23
yes, I am using a mac

davisbroda
2016-08-09 14:23
tried pulling, but it says I am already up to date

cbf
2016-08-09 14:24
ok, give me 20 minutes or so to complete rebuilding my env

davisbroda
2016-08-09 14:25
thanks for the help. appreciate you taking the time

cbf
2016-08-09 14:47
I just rebuilt my development environment and everything seems copasetic

cbf
2016-08-09 14:48
you might try vagrant destroy and then vagrant up to completely rebuild yours from scratch

davisbroda
2016-08-09 14:49
I'll try rebuilding again, and see if that fixes it. Thanks for the help though.

sbrakev
2016-08-09 15:41
anyone in the Austin, TX area want to attend a meetup on Thursday? Hyperledger focused and part 1 of a 4-part series.

joseph
2016-08-09 16:10
Hi,

joseph
2016-08-09 16:11
what happen if I put an infinite loop inside an invoke method of a chaincode?

ashnur
2016-08-09 16:13
joseph: what do you expect it should happen?

joseph
2016-08-09 16:15
I wonder if there is an infinite loop inside an invoke method, it would never get an consensus?

ashnur
2016-08-09 16:17
depends on the consensus algorithm, but this would be called a non-cooperative peer which happens all the time in practice anyway. if the network is large enough, it will tolerate it.

muralisr
2016-08-09 16:18
@joseph: @ashnur in 0.5 release, execution is after consensus and chaincode is expected to be deterministic and halt.

muralisr
2016-08-09 16:19
I’d expect the execute to fail with timeout and not be included in the block

ashnur
2016-08-09 16:19
@muralisr: well, as I said, depends on the algorithm

muralisr
2016-08-09 16:19
right

ashnur
2016-08-09 16:19
i know that pbft gives consensus with 3f+1 honest peers

ashnur
2016-08-09 16:19
but I bet it's hard to actually implement it

ashnur
2016-08-09 16:21
@muralisr: when will we get fabric next? :slightly_smiling_face:

joseph
2016-08-09 16:23
@muralisr: you mean, at present, fabric will halt the infinite loop with time out?

joseph
2016-08-09 16:25
and how long is time out in fabric now?

muralisr
2016-08-09 16:25
I don’t know if a timeline has been drawn on the roadmap… it would depend on the community processes wouldnt it ?

ashnur
2016-08-09 16:25
@muralisr: sry, i should've asked what is needed to be done before it...

ashnur
2016-08-09 16:26
sometimes i translate colloquialisms (thx autocorrect) from hungarian and it means something else in english :-S

muralisr
2016-08-09 16:27
ah :slightly_smiling_face:

joseph
2016-08-09 16:31
@ashnur: Could you explain about non-cooperative peer?


ashnur
2016-08-09 16:35
i think she explains it way better than I could :slightly_smiling_face:

joseph
2016-08-09 16:38
@ashnur: Thanks.

rseeger
2016-08-09 16:54
Hello -- I have a peer discovery issue. The peers are reporting their internal Docker IPs (172.x.x.x) instead of their external IP addresses, so other peers are unable to connect e.g. here's the info a peer received about peer ID HL2: ```16:49:55.556 [peer] beforePeers -> DEBU 2b4f9 Received PeersMessage with Peers: peers:<ID:<name:"HL2" > address:"172.17.0.28:7051" type:VALIDATOR > peers:<ID:<name:"Cisco-hl3" > address:"172.17.0.2:7051" type:VALIDATOR >``` Anyone familiar with this particular issue?

rseeger
2016-08-09 17:04
i.e. Peer1 starts up. Peer2 starts up pointing to Peer1's CORE_PEER_DISCOVERY_ROOTNODE external IP. Peer2 says "Hi, in case anyone asks, my IP is 172.17.41.1" (wrong). Peer3 starts up also pointing to Peer1's CORE_PEER_DISCOVERY_ROOTNODE external IP and asks for peers. Peer1 says it knows about Peer2 at 172.17.41.1. Peer3 tries to connect to Peer2 at that IP, but times out because that's an internal docker IP on a different machine.

cbf
2016-08-09 17:14
@rseeger: that seems like a bug


cbf
2016-08-09 17:20
@rseeger: any info you can add regarding your configuration, commit level etc would be appreciated

rseeger
2016-08-09 17:29
Sure, but it feels like a config issue. The peer just needs to be able to announce it's external IP so other remote peers can connect to it.

rseeger
2016-08-09 17:32
Someone must have built a network of >2 nodes where the peers are not all on the same machine. In the meantime, I'm RTFMing! :slightly_smiling_face:

rseeger
2016-08-09 17:38
I don't have a JIRA login, but the config is basically:

rseeger
2016-08-09 17:38
First peer is started with: ```docker run -d -it -e CORE_VM_ENDPOINT=http://172.17.42.1:2375 -e CORE_LOGGING_LEVEL=DEBUG -e CORE_PEER_ID=Cisco-PEER1 -e CORE_PEER_ADDRESSAUTODETECT=true -p 7051:7051 hyperledger/fabric-peer peer node start``` Then we start subsequent peers (on different machines) to point to the external IP of the first (let's say it's 10.20.30.40): ```docker run -d -it -e CORE_VM_ENDPOINT=http://172.17.0.1:2375 -e CORE_PEER_ID=PEER2 -e CORE_PEER_ADDRESSAUTODETECT=true -e CORE_PEER_DISCOVERY_ROOTNODE=10.20.30.40:7051 -e CORE_LOGGING_LEVEL=DEBUG -p 7051:7051 hyperledger/fabric-peer peer node start```

rseeger
2016-08-09 17:42
All the peers can talk to the first one (because the external IP is explicitly specified) but not each other (because they only announce their Docker IPs)

rseeger
2016-08-09 17:51
Just realized my LinuxFoundation ID works for JIRA (yay SSO!). I added the info to the issue....

rseeger
2016-08-09 18:39
core/peer/peer.go line 145 GetLocalP() returns first non-loopback IP address to determine peer address; if running within Docker this will be the Docker IP 172.x.x.x; looks like you can't run a network of remote Hyperledger peers if you launch the peers with Docker.

yuki.k
2016-08-09 20:58
has joined #fabric

rseeger
2016-08-09 21:54
I think the solution would be to pass the host IP to the docker container (as -e argument), then modify GetLocaIP() to check for that first. The docker-ized peer would then announce the correct IP to the network. I could make a pull request for this if it the correct approach. Thoughts?

bgorman
2016-08-10 01:35
@pascalli: I've been working on the unittesting of chaincode, I've got a changeset here if you'd like to review it: https://gerrit.hyperledger.org/r/#/c/365/

yaoguo
2016-08-10 01:37
has joined #fabric

bgorman
2016-08-10 02:06
@rseeger: you could set CORE_PEER_ADDRESSAUTODETECT=false and manually set CORE_PEER_ADDRESS to some routable hostname and port of your docker container (you might need to publish the ports externally from docker too)

nick.dawson
2016-08-10 05:35
did the REST API change recently? I just moved from the 0.5-developer preview tag on gitlab to master on gerrit and the Rest API is no longer returning any transactions in the transaction array

nick.dawson
2016-08-10 05:35
``` curl -s localhost:7050/chain/blocks/2 | python -m json.tool { "nonHashData": { "chaincodeEvents": [ {} ], "localLedgerCommitTimestamp": { "nanos": 155322429, "seconds": 1470805438 } }, "previousBlockHash": "nSnd2QmWub+UbJYhm9tXgBwBpbKOj/lST5/8VXugFT6wcJ5FnoUb+d0/n7yJmy/Qwdd+ZbqD6WzanlTtnfYrfg==", "stateHash": "zcp+UXwCBpdBCop6136fQMpwDdatQTBKT45K5NSB/5HqlMfYKZlqX7jqpqSn4ju6KUqpSBS0tXMmFj5YGoNPUg==“ } ```

bgorman
2016-08-10 05:35
@nick.dawson: are you using the new port 7050?

nick.dawson
2016-08-10 05:35
yes

bgorman
2016-08-10 05:35
ok nvm :slightly_smiling_face:

bgorman
2016-08-10 05:38
what does your block 1 look like?

nick.dawson
2016-08-10 05:38
same thing: ``` curl -s localhost:7050/chain/blocks/1 | python -m json.tool { "nonHashData": { "chaincodeEvents": [ {} ], "localLedgerCommitTimestamp": { "nanos": 909775870, "seconds": 1470805254 } }, "previousBlockHash": "/HSfgnOdDA929g7hQatn+0vsHcUAxwdRCXxKSKai89PvUs1qtbv6vLY/hxnbKTshwVJtq5jALv3mZxbdAHLGAw==", "stateHash": "zcp+UXwCBpdBCop6136fQMpwDdatQTBKT45K5NSB/5HqlMfYKZlqX7jqpqSn4ju6KUqpSBS0tXMmFj5YGoNPUg==“ } ```

bgorman
2016-08-10 05:38
did you do a deploy?

bgorman
2016-08-10 05:40
if I invoke on an invalid chaincode ID, I get a similar block to you { "stateHash": "xOsTG+WTjSxbYYKS+U7o8L4dGdmRn1IOFT1lF0/t1172OdFEXaE2ET9fk10iyCqakT4XOf6HRPtzf7rI09W2qA==", "previousBlockHash": "akb0VKNsY69DNi6095xqqlh5HlUbNAIzGsjNN/gqavr1w+j+QuNQkxpM8aMt87j8a5Igf89gf91eMchUXm25bg==", "consensusMetadata": "CAM=", "nonHashData": { "localLedgerCommitTimestamp": { "seconds": 1470806934, "nanos": 204005824 }, "chaincodeEvents": [{}] } }

bgorman
2016-08-10 05:40
when I use a valid chaincode ID, I get the usual transactions array with details

nick.dawson
2016-08-10 05:41
okay thanks for verifying

nick.dawson
2016-08-10 05:41
ill look into it more

nick.dawson
2016-08-10 05:41
could be user error

bgorman
2016-08-10 05:41
perhaps your deploy failed?

nick.dawson
2016-08-10 05:42
i would hope it would give some sort of useful error message for that

nick.dawson
2016-08-10 05:43
im in dev mode

bgorman
2016-08-10 05:44
oh you're manually running the chaincode then....

nick.dawson
2016-08-10 05:44
yeah

nick.dawson
2016-08-10 05:52
i think the deploy is failing, need to look into it more

nick.dawson
2016-08-10 05:52
thanks for your help

bgorman
2016-08-10 05:53
nps, good luck :slightly_smiling_face:

pascalli
2016-08-10 08:04
@bgorman: Thanks for the link

ashnur
2016-08-10 14:22
`make peer` dies for me with `/usr/bin/ld: cannot find -lrocksdb`

ashnur
2016-08-10 14:22
should i run this in vagrant or something?

simon
2016-08-10 14:25
yes, or put rocksdb in your path

simon
2016-08-10 14:25
linker path

simon
2016-08-10 14:25
or adjust your linker path to include rocksdb

ashnur
2016-08-10 14:31
thanks

rseeger
2016-08-10 17:22
@bgorman: Thanks for that solution!

rseeger
2016-08-10 17:50
@bgorman: Do you know where I can find documentation for all the environment variables you can set e.g. (-e CORE_*)?

tuand
2016-08-10 17:51
you can use env variables to set any of the config values in core.yaml, pbft/config.yaml, etc ...

rseeger
2016-08-10 18:01
I see OK thx!

jonathanlevi
2016-08-10 18:17
We should have `Membership Services` supporting this too. Interestingly enough, @ramesh opened an issue about this about 15 mins prior to this convo... should be part of a bigger issue of supporting all env_vars probably.

jonathanlevi
2016-08-10 18:17

simon
2016-08-10 18:19
jira is so fantastically slow

simon
2016-08-10 18:20
almost like it was written in ruby on rails

jonathanlevi
2016-08-10 18:21
Ha ha!

jonathanlevi
2016-08-10 18:22
It depends on the server/hardware though. I have a deployment on Digital Ocean and one on AWS and it's blazingly fast.

jonathanlevi
2016-08-10 18:22
But good to know we subscribe to the same point of view WRT RoR! :wink:

simon
2016-08-10 18:27
i've never seen a fast jira instance

simon
2016-08-10 18:28
just comparing to github issues

jonathanlevi
2016-08-10 18:36
@simon: oh, relatively - you are absolutely right :wink:

jonathanlevi
2016-08-10 18:37
Especially once JIRA is customized with add-ons, etc... very true. Just saying that with enough RAM, it can be smooth. Not as fast as GH, I agree (though it does have a lot more features, etc.)

lynx
2016-08-11 06:50
has joined #fabric

lynx
2016-08-11 06:55
Will be updated repository on http://github.com? Or I have to use https://gerrit.hyperledger.org/ to be staying tuned?

ashnur
2016-08-11 07:06
@lynx: gerrit :disappointed:

lynx
2016-08-11 07:21
@ashnur: thx

hgabor
2016-08-11 09:07
what about using "Rebase if necessary" merge strategy in the repo?

lyriarte
2016-08-11 10:12
has joined #fabric

trichalo
2016-08-11 10:46
has joined #fabric

yacovm
2016-08-11 12:31
something I don't quite understand - github has a markdown "compiler"\"renderer" , gerrit doesn't (I assume). So what happens to all the markdown documents now? people are expected to download them and use some kind of online\local software to present them nicely?

hgabor
2016-08-11 12:36
@yacovm - I guess yes. but there were rumors about mirroring gerrit to github or something. if that was true then the github renderer remains

yacovm
2016-08-11 12:39
cool

simon
2016-08-11 12:48
markdown is fine to read as text

yacovm
2016-08-11 13:15
yeah but it's nicer to the eye if it's markdown compiled to HTML

lyriarte
2016-08-11 13:24
Well as far as I'm concerned it's more the ability to follow symlinks that I miss, but for now I guess I'll just have to write some kind of a script to do it locally on my machine :confused:


ibmdannywong
2016-08-11 13:30
Well received @cbf

cbf
2016-08-11 13:30
If you have open issues in GH, please migrate them to Jira per my note above. If you no longer care about the issue, please close the GH issue. We will be going through GH issues over the coming days to clean up any stragglers

ibmdannywong
2016-08-11 13:30
ok!

cbf
2016-08-11 13:30
thx!

tokugawa
2016-08-11 17:55
has joined #fabric

axc
2016-08-11 19:37
has joined #fabric

joseph
2016-08-12 05:02
@cbf: Jira is for everyone? I signed up but I could not log in?

bgorman
2016-08-12 05:07
@joseph: did you sign up to the Linux Foundation ID thing? that username/password should work on the JIRA page

ry
2016-08-12 05:16
@joseph: if you’re able to log in to http://identity.linuxfoundation.org, the same user ID/password should auth you to http://jira.hyperledger.org

joseph
2016-08-12 06:16
Thanks all.

ashnur
2016-08-12 07:51
@ry: and if someone is logging in with a github on http://identity.linuxfoundation.org/?

ashnur
2016-08-12 07:54
oh, the new password link that I get in email works only if I log out first. guess it was a rush job or something :slightly_smiling_face:

joseph
2016-08-12 08:47
Hi,

joseph
2016-08-12 08:47
When I start peers with CORE_SECURITY_ENANLED=true

joseph
2016-08-12 08:47
I get error messages

joseph
2016-08-12 08:47
vp_1 | 08:45:52.398 [crypto] Errorf -> ERRO 01b [validator.vp] Failed requesting read certificate [rpc error: code = 2 desc = "grpc: the client connection is closing"]. vp_1 | 08:45:52.398 [crypto] Errorf -> ERRO 01c [validator.vp] Failed requesting ECA certificate [rpc error: code = 2 desc = "grpc: the client connection is closing"]. vp_1 | 08:45:52.398 [crypto] Errorf -> ERRO 01d [validator.vp] Failed getting ECA certificate [rpc error: code = 2 desc = "grpc: the client connection is closing"]. vp_1 | 08:45:52.398 [crypto] Errorf -> ERRO 01e [validator.vp] Failed retrieving ECA certs chain [rpc error: code = 2 desc = "grpc: the client connection is closing"]. vp_1 | 08:45:52.398 [crypto] Errorf -> ERRO 01f [validator.vp] Failed registering node crypto engine [rpc error: code = 2 desc = "grpc: the client connection is closing"]. vp_1 | 08:45:52.398 [crypto] Errorf -> ERRO 020 [validator.vp] Failed registering peer [vp]: [rpc error: code = 2 desc = "grpc: the client connection is closing"] vp_1 | 08:45:52.398 [crypto] Errorf -> ERRO 021 [validator.vp] Failed registering [vp]: [rpc error: code = 2 desc = "grpc: the client connection is closing"] vp_1 | 08:45:52.399 [crypto] RegisterValidator -> ERRO 022 Failed registering validator [vp] with name [vp] [rpc error: code = 2 desc = "grpc: the client connection is closing"]

joseph
2016-08-12 08:50
Could you please give me an idea about the problem?

lynx
2016-08-12 09:19
You have to start membersrvc first

pvishnum
2016-08-12 18:20
has joined #fabric

yacovm
2016-08-12 19:39
either gerrit is slow, my internet connection is slow, or... the project has gained some weight.

ttauruss
2016-08-14 02:43
has joined #fabric

destenson
2016-08-14 19:10
has joined #fabric

lchiu
2016-08-14 23:16
has joined #fabric

ashnur
2016-08-15 08:30
should i still be using v0.5? because the docs is way forward compared to it and I suspect master might be more stable at this point

ibmamnt
2016-08-15 08:41
I think so, there is no release branch in new gerrit repository. If you need features under-development, pull the source from current. I doublt that master branch is stable than v0.5.

ibmamnt
2016-08-15 08:44
And question, what is a correct procedure of "chaincode" panic recovery ? When panic() happens, the chaincode docker stops. After this, chaincode docker image do not run again even if I put transaction invoke event. I tried to run it manually, but failed. I get this error. ```Could not get deployment transaction for 7ab250e066d7d41bcb61f2d8a8e219a35143183dab9c7c54845d3573b1ad1a0a - LedgerError - ResourceNotFound: ledger: resource not found)"},"id":3}```

ibmamnt
2016-08-15 08:45
I'm using v0.5-developerpreview release from http://github.com, not current gerrit.

ashnur
2016-08-15 08:45
i haven't had to deal with this yet

ashnur
2016-08-15 08:47
but it's something that will inevitably pop up. i think some restart mechanism should be there, or just make sure it never throws :thinking_face: :stuck_out_tongue_winking_eye:

lynx
2016-08-15 09:19
Hi, where can I find the new specifications of the REST interface? I know that now I have to base64 encode payload, but I haven`t found any doc

hgabor
2016-08-15 09:23
@lynx the docs are waiting for review. I have updated them but no review yet; :disappointed:

lynx
2016-08-15 09:24
What branch is it?


lynx
2016-08-15 09:25
Thx

lynx
2016-08-15 09:27
That's what I need

hgabor
2016-08-15 09:31
I hope it will be accepted and merged but it does not seem so now

jblaszczyk
2016-08-15 18:59
has joined #fabric

davisbroda
2016-08-15 19:33
Is there a list of all environment variables that can be set when submitting a chaincode? ones like `CORE_SECURITY_ENABLED`? For the moment I'm just looking for a way to change the logging level for a chaincode I'm working on, but I figure having the entire list - if it exists - is probably a good idea.

roylai
2016-08-16 04:14
has joined #fabric

avneet117
2016-08-16 04:38
has joined #fabric

wangbin767
2016-08-16 08:01
has joined #fabric

lynx
2016-08-16 09:56
Hi

lynx
2016-08-16 09:56
In which cases the verifyAndRecoverBlockchain function is called while peer is running?

lynx
2016-08-16 10:05
I'm experimenting with composite block hash and I need to check that the chain is consistent after my changes

simon
2016-08-16 11:22
what is composite block hash?

simon
2016-08-16 11:22
i think ideally the blockchain should be checked on each start

lynx
2016-08-16 11:51
I haven't found where it's called

lynx
2016-08-16 11:52
Composite hash - using of two hashes to link blocks. One hash allows to change block content, if you have a key for that hash

simon
2016-08-16 11:58
lynx: can you explain more?

lynx
2016-08-16 12:34
It's a chameleon hash, that have pair of keys (public, private) and two nonces. With public key you can check hash and with the private you can get hash collision, and than change the content of the block.

simon
2016-08-16 13:05
what's the application for that?

lynx
2016-08-16 13:06
Redactable blockchain

simon
2016-08-16 13:07
i see both the appeal and the danger :slightly_smiling_face:

lynx
2016-08-16 13:08
It's the blockchain where the Blockchain holder who own the private key can change the blockchain

simon
2016-08-16 13:09
if they can do that

simon
2016-08-16 13:09
why don't they run a centralized server

simon
2016-08-16 13:09
higher performance and easier to build

lynx
2016-08-16 13:09
Now, it's just experiment

lynx
2016-08-16 13:10

simon
2016-08-16 13:13
thanks!

lynx
2016-08-16 13:14
I try to change block hash as simple byte array to more complex data structure, may be with own methods

davisbroda
2016-08-16 13:30
Is there a cannonical list of environment variables taken by fabric peer and fabirc chaincodes? like "CORE_SECURITY_ENABLED"

simon
2016-08-16 13:31
the env variables are equivalent to the yaml settings

davisbroda
2016-08-16 13:32
ah. Thanks

davisbroda
2016-08-16 13:50
I've looked through the env variables, and as far as I can tell, the following environment variable `CORE_LOGGING_PEER=INFO` should set the logging level to info rather than debug, overriding the yaml file. However when I supply this with a chaincode, it still spits out a bunch of debug information. Am I using the wrong command, or can this variable only be properly set when starting the peer, and cannot be individually tweaked for a chaincode - for instance, to have one chaincode give debug info, while the other does not.

garisingh
2016-08-16 14:03
pushing this to fabric channel

garisingh
2016-08-16 14:12

geahaad
2016-08-16 15:47
has joined #fabric

patstoms
2016-08-16 16:52
has joined #fabric

silliman
2016-08-16 18:07
has joined #fabric

sachikoy
2016-08-17 03:02
Hi, where can find the latest documentation on thew new architecture, such as the new consensus mechanism? There are documents on GitHub wiki but looks like they have not been updated for long time. https://github.com/hyperledger/fabric/wiki/Fabric-Next

bgorman
2016-08-17 03:45

bgorman
2016-08-17 03:46
I don't know if the wiki contents made it into there

inatatsu
2016-08-17 03:48
has joined #fabric

sachikoy
2016-08-17 03:54
@bgorman thank you!

ry
2016-08-17 05:08
@sachikoy: there is a lot of discussion on the mailing lists around how to move forward with documentation in general and wikis in particular

ashishkel
2016-08-17 06:34
Is this true? That we are depricating REST API ? So how are we going to interact with the fabric from outside ? ( say some java application wants to talk to fabric... )

hgabor
2016-08-17 07:05
@ashishkel: I do not know if it will be deprecated or not but one can use GRPC (from Java, easily) and the SDK

ashishkel
2016-08-17 07:06
oh is that so.. then i m relieved.. I was just worried about the interfacing part.. Let me look up a bit on the gRPC.

hgabor
2016-08-17 07:10
@ashishkel: as I know - anyone, please correct me - there are two 'usable' grpc apis: devops (it will be deprecated) and "Peer API"

baohua
2016-08-17 09:09
although grpc is fast, but maybe we should remain the restful api, which is more popular today. Many legacy components still need a rest api.

hgabor
2016-08-17 09:14
I have no intent to remove it :slightly_smiling_face:

hgabor
2016-08-17 09:15
now, as you know, it needs base64 data for chaincode arguments (as those are []byte now) but @bgorman is working on a changeset that will make it look like it did before

sachikoy
2016-08-17 09:27
@ry: thank you, I found mail threads in http://lists.hyperledger.org/pipermail/hyperledger-fabric/

ashishkel
2016-08-17 10:48
@hgabor: Okay. Lets hope we keep Rest alongside anyways. :pray::skin-tone-3:

garisingh
2016-08-17 10:52
@ashishkel: my opinion on the REST interface is that "peer" nodes should only implement / expose operations about the network, statistics, etc. We should then have a standalone REST server / implementation which is built on top of the SDK.

garisingh
2016-08-17 10:52
This way, you'd have the ability to provided whatever security integrations are required for the REST API without us having to pollute the peer code with an infinite number of options

garisingh
2016-08-17 10:53
this will be much cleaner in the long run

ashishkel
2016-08-17 10:56
@garisingh: there are two types of peer code rite? System chain code and the user chaincode. When u said polluting the peer code with unnecessary options, u meant the System chain code part ?

simon
2016-08-17 10:56
what's the deal with "ChaincodeInvocationSpecification" etc?

simon
2016-08-17 10:56
why do we have this?

simon
2016-08-17 10:56
why not directly a Transaction?

ashishkel
2016-08-17 11:00
@garisingh: and what I understood is, the user chaincode level operations ( init/invoke/query) are going to be routed through the new REST server . And anything which u want to query directly on the peer - ( its own statistcs. health etc ) you would expose as REST API directed against the peer.

ashishkel
2016-08-17 11:01
in that case where are we goin to run this REST server ? along with Peer itself?

garisingh
2016-08-17 11:13
think of the REST server as being like a "proxy" client for your applications. So for example instead of integrating the SDK with all of your applications, you deploy the REST server within your environment and then have your apps communicate with it instead of going directly to the Peer(s) via GRPC

garisingh
2016-08-17 11:14
so you could technically run it anywhere that can connect to the peer

simon
2016-08-17 11:16
i don't quite understand what the SDK does

simon
2016-08-17 11:16
and why it is in node.js

simon
2016-08-17 11:17
let's say i have my existing system written in java

simon
2016-08-17 11:17
do i have to run the node.js SDK stuff somewhere, and my system talks to the SDK?

simon
2016-08-17 11:17
or would i talk directly to the peers?

ashishkel
2016-08-17 11:20
@garisingh: that sounds fair.

ashishkel
2016-08-17 11:21
but as simon was asking, this SDK is based on Node.js alone?

ashishkel
2016-08-17 11:24
as far as my current mental picture of an SDK goes, its a blackbox, which talks to me in CLI/REST & Some Node.js code

ashishkel
2016-08-17 11:24
I have made hands dirty with CLI nd Restful side. but node.js has been left alone till now.

ashishkel
2016-08-17 11:25
and the client program we have uses the Restful handle to interact with the Fabric now.

ashishkel
2016-08-17 11:27
So with gari's approach, the only thing which changes is , I m not goin to talk to my peer for any chaincode ( user chaincode) stuff anymore *unless* i need to know some specific things which a physical peer can only tell.

ashishkel
2016-08-17 11:27
is this understanding correct?

garisingh
2016-08-17 11:29
yeah - instead of the REST endpoint being the peer for transactions, it would be to this mythical REST server I'd like to see us build

garisingh
2016-08-17 11:30
at this point, I really waiting to do this for the V.next architecture.

claytonsims
2016-08-17 20:39
has joined #fabric

baohua
2016-08-18 02:29
whatever language the sdk is implemented based on. would like to suggest keeping it simple and stateless, by only take advantages of fabric functionalities, instead of having additional black code. This can also help decouple, and support new architecture.

pascalli
2016-08-18 05:52
Hi, i would like to use logger in my chaincode, to display logs in the stderr console like peer or shim. I use a vagrant VM, I use the following command to start my node: ./peer node start --loggin-level=info, and I use the following code in my chaincode: var logger = shim.NewLogger("mychaincode") main: logger.SetLevel(shim.LogInfo) logLevel, _ := shim.LogLevel(os.Getenv("SHIM_LOGGING_LEVEL")) shim.SetLoggingLevel(logLevel) but I haven't logs from my chaincode in the console! is somebody can help me ? thanks

bgorman
2016-08-18 05:57
@pascalli the chaincodes run in their own docker containers, named something like <network>-<peer>-<chaincodeID>, try looking in there for your logs with `docker logs <containerID>`

pascalli
2016-08-18 06:03
ok thanks


zaki
2016-08-18 14:26
Thanks for the heads up @cbf

baohua
2016-08-18 14:41
+1

joseph
2016-08-18 16:09
Hi,

joseph
2016-08-18 16:10
I run a fabric network with security and privacy enabled.

joseph
2016-08-18 16:10
When I query a chaincode, it returns data that look like encrypted.

joseph
2016-08-18 16:11
How can I do to decrypt that data?

kalpatel
2016-08-18 17:48
has joined #fabric

kazuuu
2016-08-18 19:38
has joined #fabric

warm3snow
2016-08-19 01:48
When I start 4 peers by docker-compose... command, I got this error. Can anyone help me with it. Any help would be appreciated !! [peer] handleChat -> ERRO 072 Error handling message: Peer FSM failed while handling message (DISC_HELLO): current state: created, error: transition canceled with error: Error registering Handler: Duplicate Handler error: {name:"vp1" 172.17.0.4:30303 VALIDATOR }

truc.nguyen
2016-08-19 03:23
has joined #fabric

truc.nguyen
2016-08-19 03:23
@joseph the result is hex-encoded. tx.on('complete', function (results) { console.log('Results:[%j]', new Buffer(results,'hex').toString()); } should work

pascalli
2016-08-19 07:23
Hi, I use a table in my chaincode, | A |B |C | D |...where A, B , C, and D are keys. So I would like use the getrows methods with the follows parameters: getRows(args[D]) getRows(args[A]) getRows(args[B][D]) getRows(args[C][D]) do you know the syntaxe to used ? thanks

joseph
2016-08-19 10:55
@truc.nguyen: thanks

sheehan
2016-08-19 12:56
@pascalli: It’s not possible today. The partial key queries supported would be A A | B A | B | C A | B | C | D Currently, focus is on improving the query capability in the next architecture. If you have specific requirements, it would be great to open an issue at http://jira.hyperledger.org

pascalli
2016-08-19 13:13
ok thanks I suspected, but I wanted to be sure

muralisr
2016-08-19 13:25
@suri

suri
2016-08-19 13:25
has joined #fabric

muralisr
2016-08-19 13:26
@suri. I’ll look in peer logs for errors

muralisr
2016-08-19 13:26
at the time of deploy

muralisr
2016-08-19 13:26
make sure works in —peer-chaincodedev mode first before moving on.

muralisr
2016-08-19 13:27
will be away for a bit …. but you are in the right channel for help

mgk
2016-08-19 13:46
has joined #fabric

mohan
2016-08-19 14:05
has joined #fabric

vijayr24
2016-08-19 14:49
has joined #fabric

obernin
2016-08-19 14:54
has joined #fabric

vijayr24
2016-08-19 14:54
Hi All, I am trying to install hyperledger fabric in my local machine using the docker method (option 2 - http://169.53.62.117/site/Setup/Chaincode-setup/#running-the-cli-or-rest-api). I am able to run the peer, CA. I was successful in starting and registering the chain code. I need help to ssh into the docker container that is running the peer and test the Rest API to deploy the example chain code. Thank you in advance for your help!

muralisr
2016-08-19 15:03
@vijayr24:_ I was successful in starting and registering the chain code._ … sounds like you have already “deployed” the chaincode ?

muralisr
2016-08-19 15:05
how is that different from _(I want to) test the Rest API to deploy the example chain code_

cbf
2016-08-19 15:06
you should be able to use Swagger or Postman etc to access the REST API

cbf
2016-08-19 15:07
as for chaincode, if you are running in —peer-chaincodedev mode, and you start your chaincode directly, it does not need to be “deployed” by the REST API because it self-deploys on start-up

cbf
2016-08-19 15:07
you can just start invoking

ghaskins
2016-08-19 15:14
@cbf unless something changed, note that you still do need to “deploy” devmode to set the ctor args

ghaskins
2016-08-19 15:14
the chaincode app starts up in a quasi paused state until you complete the deploy

ghaskins
2016-08-19 15:15
calling it “deploy” is a bit of a misnomer, but hey

ghaskins
2016-08-19 15:15
:wink:

cbf
2016-08-19 15:16
sigh - then the docs suck

cbf
2016-08-19 15:16
because that is not what they say

muralisr
2016-08-19 15:20
in any case _I think shouldn’t need to ssh into the peer to do things. I suspect @vijayr24 is attempt to use CLI (for which you do need to be on the peer). To reiterate @cbf’s suggestion REST API from outside the peer would be the way to go

kletkeman
2016-08-19 15:47
@vijayr24 @cbf @muralisr @ghaskins The docs are rather densely packed since the sandbox doc became the chaincode_setup doc and combined three different methods of setting up for debugging. But the docs do seem to be pretty accurate. I have had no trouble working with a single peer in dev mode and my chaincodes in dev mode as well. The deploy command is necessary to call your Init, and it should be the first message you send after starting up the chaincode, else it will be ignored. I find, though, that if your container's database has been initialized, you can restart at will and just carry on without the deploy. Everything works as expected. I have also implemented a "clearWorldState" function that I find incredibly handy so that I can start again with a deploy etc ... Working with POSTMAN using REST works perfectly fine as well. For a fairly well featured IoT sample with related POSTMAN scripts and environments, take a look at the sdk folder linked below. There are docs to go with it. It is far from perfect, but it is an exploration of ways in which Hyperledger can be used for IoT contracts with a single tracked asset and multiple devices reporting on it. It tries to avoid API proliferation using a pattern I came up with called "partial state as event" ... I am working on the more advanced form with multiple related assets and multiple event functions, but that will not be ready for a few weeks as I am on vacation right now. https://github.com/ibm-watson-iot/blockchain-samples/tree/master/sdk

vijayr24
2016-08-19 16:11
@muralisr: I was successful until the step where I register the chain code "CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:7051 ./chaincode_example02". When I started a new terminal and tried to deploy the chain code via rest api using the command " peer chaincode deploy -n mycc -c '{"Function":"init", "Args": ["a","100", "b", "200"]}'" at first I got an error bash: peer command not available

vijayr24
2016-08-19 16:13
then I ran the command make peer...and tried to deploy the code, i received this error message "Error: Chaincode argument error: illegal base64 data at input byte 0"

ramesh
2016-08-19 16:19
@vijayr24 : please see this https://jira.hyperledger.org/browse/FAB-82

ghaskins
2016-08-19 16:34
@hgabor I dont think that patch was ready to go in

ghaskins
2016-08-19 16:34
I had suggested in the past perhaps it was best targetted to a branch so we can tie up all the loose ends with the ABI

ghaskins
2016-08-19 16:35
should we consider doing that now with a reversion, or plow ahead?

hgabor
2016-08-19 16:36
@bgorman has a patch that enables users to use the rest and the cli as they used to, with strings

hgabor
2016-08-19 16:37
Not b64

hgabor
2016-08-19 16:37
Please have a look at it

hgabor
2016-08-19 16:37
I m struggling with making it pass the tests

vijayr24
2016-08-19 16:57
@ramesh: I get the following error when i try to pull the docker update mentioned in the bug docker pull fd498d2 Using default tag: latest Pulling repository http://docker.io/library/fd498d2 Error: image library/fd498d2:latest not found

ramesh
2016-08-19 16:59
I mean `docker pull hyperledger/fabric-peer:master-fd498d2`.

ghaskins
2016-08-19 17:31
@hgabor oh, ok, cool

truc.nguyen
2016-08-19 19:49
Hi I had the same problem, i resolved it by fix the docker-compose file. the attach file: https://hyperledgerproject.slack.com/files/truc.nguyen/F235A5WNS/docker-compose.yml

cbf
2016-08-19 20:07
file not found

truc.nguyen
2016-08-19 20:08
@truc.nguyen shared a file: https://hyperledgerproject.slack.com/files/truc.nguyen/F235A5WNS/docker-compose.yml and commented: [crypto] Errorf -> ERRO 01b [validator.vp] Failed requesting read certificate [rpc error: code = 2 desc = "grpc: the client connection is closing"].

adrianclv
2016-08-19 20:28
has joined #fabric

arner
2016-08-20 10:50
Hi, We can listen to the submitted, complete and error events from the client SDK but for instance the 'complete' event is just 'waited for 5 seconds and assumed it was completed'. So a few questions come up: 1) Is there work being done on making these events more real? 2) Are there more events we can listen to? 3) Can we already fire events from the chaincode? 4) Can we listen to events from the chaincode? Thanks!

ghaskins
2016-08-20 12:03
@arner: that's all under active development. The fabric side was merged this week and the SDK side should follow shortly

arner
2016-08-20 12:04
That's great news. Could you elaborate a little bit on which parts are (more or less) ready?


ghaskins
2016-08-20 12:08
That was merged this past week. I know Patrick is also working on the SDK side

ghaskins
2016-08-20 12:09
IIUC this would be primarily WRT system type events, like blocks and transactions

ghaskins
2016-08-20 12:09
Chaincode events might be further out, not sure

ghaskins
2016-08-20 12:10
I'd defer to @muralisr and @pmullaney for details

ghaskins
2016-08-20 12:11
I'm guessing you are probably not using chaintool, but @ecblseg is adding support to the chaintool CCI schema to describe custom events for chaincode

arner
2016-08-20 12:15
Alright, thanks a lot. We're indeed not using chaintool, just looking for a way to handle events in a nice way from a NodeJS web application. The eventing system will bring about a massive improvement in terms of user experience (if we can use web sockets for instance)

takakir
2016-08-21 04:23
has joined #fabric

szlaci83
2016-08-21 12:13
Hi guys, i am trying to set up a 4 peer network in docker containers....but i always get this error at deploy: [dockercontroller] Start -> DEBU 0e5^[[0m start - cannot create client invalid endpoint Any idea?

garisingh
2016-08-21 12:17
it can't find the endpoint for the docker daemon

garisingh
2016-08-21 12:21
what is the value of `CORE_VM_ENDPOINT`

szlaci83
2016-08-21 12:27
@garisingh: 172.17.0.1

garisingh
2016-08-21 12:28
172.17.0.1:2375 ?

garisingh
2016-08-21 12:28
did you start the Docker daemon with the -H option?

szlaci83
2016-08-21 12:28
yepp

szlaci83
2016-08-21 12:28
yes

garisingh
2016-08-21 12:28
what OS are you running on?

szlaci83
2016-08-21 12:29
RHEL 7.2

garisingh
2016-08-21 12:31
`ifconfig docker0`

szlaci83
2016-08-21 12:31
i ve restarted the docker daemon to be sure its with -H

szlaci83
2016-08-21 12:32
yepp: inet 172.17.0.1

garisingh
2016-08-21 12:35
`telnet 172.17.0.1 2375`

szlaci83
2016-08-21 12:36
172.17.0.1: Connection refused

szlaci83
2016-08-21 12:36
hmmm

garisingh
2016-08-21 12:37
`ps -ef|grep dockerd`

garisingh
2016-08-21 12:38
`ss -l |grep 237`

szlaci83
2016-08-21 12:40
root 48751 34794 0 08:40 pts/1 00:00:00 grep --color=auto dockerd

garisingh
2016-08-21 12:40
hmm - maybe `ps -ef|grep docker`

szlaci83
2016-08-21 12:42
docker daemon -H -H unix:///var/run/docker.sock

szlaci83
2016-08-21 12:43
nothing for ss

garisingh
2016-08-21 12:45
ah - you are running on 4243

garisingh
2016-08-21 12:45
CORE_VM_ENDPOINT=172.17.0.1:4243

szlaci83
2016-08-21 12:45
yepp thanks I just realised it :smile:

szlaci83
2016-08-21 12:59
i still get the same error though :disappointed:

garisingh
2016-08-21 13:00
are you using Docker compose? how are you starting the peers?

szlaci83
2016-08-21 13:01
nw something changed

szlaci83
2016-08-21 13:02
http:// was missing from the CORE_VM_ENDPOINT variable

garisingh
2016-08-21 13:02
oops - sorry about that

szlaci83
2016-08-21 13:03
thats fine

szlaci83
2016-08-21 13:03
now we know

szlaci83
2016-08-21 13:04
i wrote a script to clear up docker, the cert db and start the mebership service and 4 peers up

szlaci83
2016-08-21 13:05
for each peer i have an .env file with environment variables

szlaci83
2016-08-21 13:06
now it seems to be working except test_vp3 , which cannot register...

rafael
2016-08-21 14:46
has joined #fabric

zaki
2016-08-21 21:53
Looking for some suggestions, I have a chaincode that builds fine locally but when I try to deploy it over the network to the fabric, I get a build error during the "go install " step of the docker image construction

zaki
2016-08-21 21:53
Looking for suggestions on how to get better insight into what the actual build error is

muralisr
2016-08-21 22:31
@zaki the docker env makes it difficult to get that error … http://stackoverflow.com/questions/38913758/error-on-ibm-blockchain/38919950#38919950 has some suggestions

zaki
2016-08-21 22:33
At least I'm not missing anything obvious. I vendored all the dependencies which should have taken care of it. Thanks for the suggestions

muralisr
2016-08-21 23:07
sure thing

zaki
2016-08-21 23:12
I figured out something that worked for me. The root cause is there was an unvendored dependency I used a bunch of tools like govendor that promise to check if your build is properly vendored What ended up surfacing the error was changing to a free `$GOPATH` directory, copying in my chaincode and then running `go install [path to chaincode]`

muralisr
2016-08-21 23:39
which explicitly showed what the error was as you don’t resolve the dependency thru the vendored packag

muralisr
2016-08-21 23:39
right ?

zaki
2016-08-22 00:36
yep

zaki
2016-08-22 00:50
@zaki uploaded a file: https://hyperledgerproject.slack.com/files/zaki/F23EJ9X4P/chaincode_preflight_checklist.txt and commented: Quick summary of the things I learned this weekend about chaincode development

suri
2016-08-22 04:39
Hi I started peers and i am able to deploy chaincode and do the transaction but when query i am getting the following error

suri
2016-08-22 04:39
Error:Failed to launch chaincode spec(Could not get deployment transaction for 4ad4adda2c07741aabee4021762f2051d4d1beb3035ee834caa1768c56226a24eedf532a056b65e62a2ed00e417830076450ccfd29de6251a73b46220f5d4dd1 - LedgerError - ResourceNotFound: ledger 6:54 in debug console i am getting 13:21:39.323 [dockercontroller] Start -> ERRO 064 start-could not start container API error (400): {"message":"starting container with HostConfig was deprecated since v1.10 and removed in v1.12"}

jcarrivick
2016-08-22 04:55
@suri If you pull the latest code from Gerrit that issue should be fixed

warm3snow
2016-08-22 05:12
When I query chaincode, I got this (the SECURITY is enabled). How to decrypt it, thanks for any help. CORE_PEER_ADDRESS=172.17.0.4:30303 peer chaincode query -u jim -n a5389f7dfb9efae379900a41db1503fea2199fe400272b61ac5fe7bd0c6b97cf10ce3aa8dd00cd7626ce02f18accc7e5f2059dae6eb0786838042958352b89fb -c '{"Function": "query", "Args": ["a"]}' �Qj�# ��r�z��)�� �ïn��/��L

jcarrivick
2016-08-22 05:27
@warm3snow It looks like you are trying to query the GRPC port, not the REST port. Try `CORE_PEER_ADDRESS=172.17.0.4:5000` (note that the port should be 7050 if you are using the latest code, but it looks like you aren't)

warm3snow
2016-08-22 05:34
@jcarrivick I tried the CORE_PEER_ADDRESS=172.17.0.4:5000, but I got an error: Error: Error building chaincode: Error trying to connect to local peer: grpc: timed out trying to connect I think "CORE_PEER_ADDRESS=172.17.0.4:30303" is correct, and the query result may be encrypted. I just want to know how to get the plaintext of it Thanks anyway

jcarrivick
2016-08-22 05:37
The fact you got a plain text response to your request on port 5000 indicates you have successfully queried the REST server. The error tells you more. It seems that the chaincode you deployed was not able to build because it was not able to communicate properly.

jcarrivick
2016-08-22 05:37
How did you start your peers?

warm3snow
2016-08-22 05:47
I set up 4 peers and membersrvc, all configs in a compose files

warm3snow
2016-08-22 05:51
docker-compose-with-membersrvc.yml vp0: extends: file: peer-pbft.yml service: vp hostname: vp0 environment: - CORE_PEER_ID=vp0 - CORE_SECURITY_ENABLED=true - CORE_SECURITY_ENROLLID=test_vp0 - CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT - CORE_PEER_PKI_ECA_PADDR=membersrvc:50051 - CORE_PEER_PKI_TCA_PADDR=membersrvc:50051 - CORE_PEER_PKI_TLSCA_PADDR=membersrvc:50051 ports: - "5000:5000" links: - membersrvc vp1: extends: file: peer-pbft.yml service: vp hostname: vp1 environment: - CORE_PEER_ID=vp1 - CORE_SECURITY_ENABLED=true - CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303 - CORE_SECURITY_ENROLLID=test_vp1 - CORE_SECURITY_ENROLLSECRET=5wgHK9qqYaPy - CORE_PEER_PKI_ECA_PADDR=membersrvc:50051 - CORE_PEER_PKI_TCA_PADDR=membersrvc:50051 - CORE_PEER_PKI_TLSCA_PADDR=membersrvc:50051 links: - membersrvc - vp0 vp2: extends: file: peer-pbft.yml service: vp hostname: vp2 environment: - CORE_PEER_ID=vp2 - CORE_SECURITY_ENABLED=true - CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303 - CORE_SECURITY_ENROLLID=test_vp2 - CORE_SECURITY_ENROLLSECRET=vQelbRvja7cJ - CORE_PEER_PKI_ECA_PADDR=membersrvc:50051 - CORE_PEER_PKI_TCA_PADDR=membersrvc:50051 - CORE_PEER_PKI_TLSCA_PADDR=membersrvc:50051 links: - membersrvc - vp0 vp3: extends: file: peer-pbft.yml service: vp hostname: vp3 environment: - CORE_PEER_ID=vp3 - CORE_SECURITY_ENABLED=true - CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303 - CORE_SECURITY_ENROLLID=test_vp3 - CORE_SECURITY_ENROLLSECRET=9LKqKH5peurL - CORE_PEER_PKI_ECA_PADDR=membersrvc:50051 - CORE_PEER_PKI_TCA_PADDR=membersrvc:50051 - CORE_PEER_PKI_TLSCA_PADDR=membersrvc:50051 links: - membersrvc - vp0 membersrvc: image: hyperledger/fabric-membersrvc:latest restart: unless-stopped expose: - "50051" - /var/run/docker.sock:/var/run/docker.sock command: membersrvc ---------------------------------------------- peer-pbft.yml vp: image: hyperledger/fabric-peer:latest restart: unless-stopped environment: - CORE_PEER_ADDRESSAUTODETECT=true - CORE_PEER_NETWORKID=dev - CORE_LOGGING_LEVEL=debug #critical, error, warning, notice, info, debug - CORE_PEER_VALIDATOR_CONSENSUS_PLUGIN=pbft # noops, pbft - CORE_PBFT_GENERAL_MODE=batch # batch. classic and sieve will be not supported again. - CORE_PBFT_GENERAL_N=4 - CORE_PBFT_GENERAL_BATCHSIZE=2 # only useful when in batch mode - CORE_PBFT_GENERAL_TIMEOUT_REQUEST=2s expose: - "30303" - "30304" - "31315" volumes: # docker.sock is mapped as the default CORE_VM_ENDPOINT - /var/run/docker.sock:/var/run/docker.sock command: sh -c "sleep 5; peer node start"

jcarrivick
2016-08-22 05:58
Hmm that seems to look OK. I've never used `CORE_VM_ENDPOINT` as the unix socket before, I've always set it to `CORE_VM_ENDPOINT=http://172.17.0.1:2375` in `environment`

jcarrivick
2016-08-22 05:58
can you give that a shot?

jcarrivick
2016-08-22 05:59
and remove the volume section from the peer-pbft.yml

warm3snow
2016-08-22 06:03
ok, I go to try it, thanks~~

suri
2016-08-22 06:38
Hi jcarrivick i took latest from github not working

jcarrivick
2016-08-22 06:39
We're in a bit of a funny situation at the moment, the development code base has moved to gerrit: https://gerrit.hyperledger.org/r/#/admin/projects/fabric which means Github is out of date

jcarrivick
2016-08-22 06:40
The plan I think is to get github to mirror gerrit at some point, but it hasn't got there yet

jcarrivick
2016-08-22 06:41
So you will need to pull the latest code from Gerrit rather than github for now

szlaci83
2016-08-22 07:50
@warm3snow: Hi, I am trying to do the same (4 peers with pbft) but i was doing it in a script with separate .env files, never tried the compose method... looks interesting.

jlamiel
2016-08-22 08:29
has joined #fabric

warm3snow
2016-08-22 09:19
@szlaci83 There're all in the bddtests/ of source code, you can read them and write your own compose-files

szlaci83
2016-08-22 09:19
yepp i just found them thanks

ashnur
2016-08-22 09:45
what is this fabric-api thing?

jizijian
2016-08-22 09:51
has joined #fabric

suri
2016-08-22 10:33
hi jcarrivick now when we deploying chain code i am getting the following errors

suri
2016-08-22 10:33
09:54:53.431 [dockercontroller] deployImage -> ERRO 018 Error building images: cannot connect to Docker endpoint 09:54:53.432 [dockercontroller] deployImage -> ERRO 019 Image Output: ******************** ******************** 09:54:53.438 [dockercontroller] Start -> ERRO 01a start-could not recreate container cannot connect to Docker endpoint 09:54:53.438 [chaincode] Launch -> ERRO 01b launchAndWaitForRegister failed Error starting container: cannot connect to Docker endpoint 09:55:04.405 [devops] invokeOrQuery -> INFO 01c Transaction ID: 67170bef-d754-4ac2-8b7a-dd480f5d265b 09:56:29.374 [devops] invokeOrQuery -> INFO 01d Transaction ID: a90bc261-b47b-4514-bd04-b21acfe1121e

csehd
2016-08-22 12:38
has joined #fabric

pascalli
2016-08-22 13:32
Hi, when we used the query method, is that write a trace in a transaction on the block? as can be seen for example by querying the API with ../chain/blocks/'block_number' because I have only traces concerning deploy or invoke methods, but nothing for query method. thanks

yacovm
2016-08-22 13:40
can you copy a line example of a trace for invoke or deploy? It might be a module that a query doesn't reach it

pascalli
2016-08-22 13:42
here request and response for an invoke method: request: curl 127.0.0.1:5000/chain/blocks/618 response: { "transactions":[ { "type":2, "chaincodeID":"EoABYzZlYjAzOWNhZWE3OTE0M2RmNDY3Y2M2ZmRiNGRlMmMzZjI1OWY2YTFkMjUyNTRmNzQxNmM5NzRkOTU3OGE1MTJkYWNjZjZlZTZmODMzNmJiNmY3OTc0YjdmOGY4NWJhMGIwNzE5MDVlYTkyMmM0OGVjYzIyODUxMmUwZDI3NGM=", "payload":"CsABCAESgwESgAFjNmViMDM5Y2FlYTc5MTQzZGY0NjdjYzZmZGI0ZGUyYzNmMjU5ZjZhMWQyNTI1NGY3NDE2Yzk3NGQ5NTc4YTUxMmRhY2NmNmVlNmY4MzM2YmI2Zjc5NzRiN2Y4Zjg1YmEwYjA3MTkwNWVhOTIyYzQ4ZWNjMjI4NTEyZTBkMjc0Yxo2CgtQb3N0Q29uc2VudBIDMTExEgMyMjISAkJQEgFSEgowNC0wNy0yMDE2EgowOC0wNy0yMDE2", "uuid":"b1afc3c2-1e07-4803-b5d2-38f487305190", "timestamp":{ "seconds":1471848219, "nanos":504746932 } } ], "stateHash":"6gqq6eGFPBCJ6XdUlGMSU5Wx8Cims87rbCFefH/aae2g+eV4F134YF66zOpiQXyq+nTeN7DmRiVVgB9zQ0lUow==", "previousBlockHash":"7tQQBFZbAzT6FVvrD/Fw9EkYu5rbRt2IM1YD8w++/hFY4Si79H3/ElSoPlIsIIETerXQY8mCFURYHjWhZAwr7A==", "nonHashData":{ "localLedgerCommitTimestamp":{ "seconds":1471848220, "nanos":987068492 }, "transactionResults":[ { "uuid":"b1afc3c2-1e07-4803-b5d2-38f487305190" } ] } }

pascalli
2016-08-22 13:44
I read in the API doc that we can have a response of type 3 (query), but I can't

jbrisbin
2016-08-22 16:02
has joined #fabric

wangbin767
2016-08-22 20:22
hi, everyone. I would like to know where can I find the guide of using/learning the fabric. Could anyone help me? Thank you very much!

nick
2016-08-22 20:36
hi wangbin767. This is one documentation page I know of


cbf
2016-08-22 20:38
@nick thanks... yes, that doc should be current... we should have our doc server host stood up soon

wangbin767
2016-08-22 20:49
@nick thank you so much!

kell
2016-08-22 20:50
especially with the 7051 port ref in the docker-compose.yaml in that. thanks @nick

pvishnum
2016-08-22 21:34
Hi.. I am unable to deploy/invoke/query chaincodes with the latest code.. Here are the steps I followed..

pvishnum
2016-08-22 21:34
1) cloned latest code

pvishnum
2016-08-22 21:34
2) make peer

pvishnum
2016-08-22 21:34
3) peer node start --peer-chaincodedev

pvishnum
2016-08-22 21:35
4) CORE_PEER_ADDRESS=0.0.0.0:7051 chaincode_example02

pvishnum
2016-08-22 21:35
5) peer chaincode deploy -n mycc -c '{"Args": ["init", "a", "100", "b", "200"]}'

pvishnum
2016-08-22 21:36
I am getting the following error: [chaincode] Launch -> ERRO 017 sending init failed(handler not found for chaincode mycc)

pvishnum
2016-08-22 21:36
anyone able to deploy chaincode example with the latest code?

gentrysherrill
2016-08-22 23:38
has joined #fabric

walterlsb
2016-08-23 00:00
has joined #fabric

hyperpiper
2016-08-23 03:22
has joined #fabric

hyperpiper
2016-08-23 03:29
@hyperpiper uploaded a file: https://hyperledgerproject.slack.com/files/hyperpiper/F23TLS8SD/screen_shot_2016-08-22_at_10.23.56_pm.png and commented: For the command `make peer`, do I have to start up docker too as well? I ran `vagrant up` and let it do it's thing and build and everything. Then when I sshed into my vagrant, I tried to run `make peer` and it gave me this error

wangbin767
2016-08-23 04:36
Error: Non-empty JSON chaincode parameters must contain exactly 1 key: 'Args'. I got this error when I run peer chain code deploy follow the instruction, could anyone help?

wangbin767
2016-08-23 04:59
I have figure out the problem... just change the command to => peer chaincode deploy -n mycc -c '{"Args": ["init", "a", "100", "b", "200"]}'


wangbin767
2016-08-23 05:00
where can I get the latest guide? or the latest CLI API?

szlaci83
2016-08-23 05:35
@hyperpiper: although i dont use vagrant, but according to your error message it seems you need to have docker daemon started...

szlaci83
2016-08-23 05:39
@pvishnum: i think mycc should be the path to the chaincode you want to deploy, ie : http://github.com/hyperledger/fabric/example/chaincode/go/chaincode_example02/

ashnur
2016-08-23 06:33
#chaincode channel is surprisingly unhelpful

ashnur
2016-08-23 06:33
did something happen? :slightly_smiling_face:

seva
2016-08-23 06:52
has joined #fabric

seva
2016-08-23 06:53
I have a question about connecting to a network with membersrvc enabled using GRPC

seva
2016-08-23 06:53
Before, I just used direct invocations of GRPC Query, Invoke, etc.

seva
2016-08-23 06:55
But with members service that doesn work, giving me error: ailed loading certificate [eca.cert.chain]

seva
2016-08-23 06:55
And "Login" call just returns success, regardless of username/password

ashishkel
2016-08-23 09:26
@wangbin767 : That has been identified as a bug and its being worked upon. [ As per my information obtained from the same forum.]

ashishkel
2016-08-23 09:27
for the time being, what you have identified is the workaround in use

stylix
2016-08-23 09:51
has joined #fabric

zhuang.wei.ming
2016-08-23 11:08
has joined #fabric

gulic
2016-08-23 11:14
has joined #fabric

balakrishna
2016-08-23 11:42
has joined #fabric

balakrishna
2016-08-23 11:42
Hello all, I am trying to run asset management example code for hyperledger/fabric. when i run the asset management application code i am facing some error. Error : sending init failed(handler not found for chaincode bbf06fd3705f348f759199e5fa42f158b36fd39e46ac1407196ebecf990676cec6c5578d1febafe5256741a7a4bad5b625a664355d0da62bd04f91541a5fa94b) i am using vagrant setup for running asset management code.Can anyone help me with this issue

muralisr
2016-08-23 11:44
@balakrishna: likely the deploy failed. What mode are you running peer in (in “—peer-chaincodedev” mode) ?

balakrishna
2016-08-23 11:46
yes. “—peer-chaincodedev” mode

balakrishna
2016-08-23 11:48
@muralisr yes. “—peer-chaincodedev” mode

balakrishna
2016-08-23 11:49
@muralisr i am running with 1 membersrvc and 1 peer node

muralisr
2016-08-23 11:51
ok

muralisr
2016-08-23 11:52
can you paste your chaincode exec line ?

muralisr
2016-08-23 11:54
if you are using CORE_CHAINCODE_ID_NAME=mycc

muralisr
2016-08-23 11:55
make sure you are passing “mycc” as name for deploy, invoke query (from CLI that would be “-n mycc”)

balakrishna
2016-08-23 12:36
i using app provided by asset manager example.


balakrishna
2016-08-23 12:38
this the application i am running to execute asset management example.

muralisr
2016-08-23 12:40
so you are running something like ` CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=127.0.0.1:7051” ./app ?`

balakrishna
2016-08-23 13:20
@muralisr just running "./app" command

muralisr
2016-08-23 13:20
try adding CORE_CHAINCODE_ID_NAME=mycc

muralisr
2016-08-23 13:21
and using “mycc” as the name of the chaincode in query invokes etc

balakrishna
2016-08-23 13:27
@muralisr sure. thanks

muralisr
2016-08-23 13:32
sure thing

hyperpiper
2016-08-23 13:35
Thanks for the help @szlaci83 but my computer can't handle their entire vagrant lol so I'm gonna try using just docker instead. Are there any full tutorials on that for mac that anyone knows of?

hyperpiper
2016-08-23 13:36
for setting up fabric on docker I mean

kell
2016-08-23 13:40

kell
2016-08-23 13:41
note: only for chaincode/api/sdk . need vagrant ( or I think, full native ubuntu install? ) for actual fabric development

kell
2016-08-23 13:48

hyperpiper
2016-08-23 13:50
awesome! So, if I'm only concerned with chaincode this is good, but if I want to make any changes or anything to the underlying fabric code, I'd *have* to use the vagrant?

kell
2016-08-23 13:51
yes @hyperpiper

hyperpiper
2016-08-23 13:53
okay awesome thanks! It'll be a while before that though haha. It's probably better to just work on chaincode

kell
2016-08-23 13:57
you’re welcome, I’m only a quarter step ahead of you :slightly_smiling_face:

cbf
2016-08-23 14:05
@hyperpiper it is possible to develop/build outside vagrant, but not the happy path

hyperpiper
2016-08-23 14:08
@cbf I would love to build with vagrant but I tried three times and my computer completely froze and I had to restart lol. If anyone knows anything to help with that, it'd be greatly appreciated though definitely! Although I do have an older computer so that plays a role probably

cbf
2016-08-23 14:09
windows?

cbf
2016-08-23 14:09
mac?

cbf
2016-08-23 14:10
OS?

hyperpiper
2016-08-23 14:11
It's a 2012 macbook pro on el capitan. It has 4 GB ram, a 2.5 Ghz processor, and 500GB storage

cbf
2016-08-23 14:11
4gb is likely your blocker

hyperpiper
2016-08-23 14:13
I think I can upgrade ram..I think. I actually may go ask someone at my computer store. You don't know how many times this laptop has brought me grief and sorrow lmao

hyperpiper
2016-08-23 14:14
The poor 2012 thing is trying to live in a 2016 world haha

kell
2016-08-23 14:19
any help with this registration error? running latest on mac under docker. REST request as documented at cbf-fabric-docs.

kell
2016-08-23 14:19

d.w.krypto
2016-08-23 14:44
has joined #fabric

dave.enyeart
2016-08-23 16:45
has joined #fabric

archimy
2016-08-23 18:04
has joined #fabric

bok.
2016-08-23 19:01
has joined #fabric

jzhang
2016-08-23 19:32
@jeffgarratt: any idea why the following error when vp0 tries to contact membersrvc (both started by docker-compose): vp0_1 | 2016/08/23 19:27:16 grpc: ClientConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp [::1]:7054: getsockopt: connection refused"; Reconnecting to "localhost:7054" vp0_1 | 2016/08/23 19:27:17 grpc: ClientConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp [::1]:7054: getsockopt: connection refused"; Reconnecting to "localhost:7054" vp0_1 | 2016/08/23 19:27:17 Failed to dial localhost:7054: grpc: timed out trying to connect; please retry. vp0_1 | 19:27:17.934 [crypto] Errorf -> ERRO 01f [validator.test_vp0] Failed requesting read certificate [rpc error: code = 2 desc = "grpc: the client connection is closing"]. vp0_1 | 19:27:17.934 [crypto] Errorf -> ERRO 020 [validator.test_vp0] Failed requesting ECA certificate [rpc error: code = 2 desc = "grpc: the client connection is closing"]. vp0_1 | 19:27:17.934 [crypto] Errorf -> ERRO 021 [validator.test_vp0] Failed getting ECA certificate [rpc error: code = 2 desc = "grpc: the client connection is closing"]. vp0_1 | 19:27:17.934 [crypto] Errorf -> ERRO 022 [validator.test_vp0] Failed retrieving ECA certs chain [rpc error: code = 2 desc = "grpc: the client connection is closing"]. vp0_1 | 19:27:17.934 [crypto] Errorf -> ERRO 023 [validator.test_vp0] Failed registering node crypto engine [rpc error: code = 2 desc = "grpc: the client connection is closing"]. vp0_1 | 19:27:17.934 [crypto] Errorf -> ERRO 024 [validator.test_vp0] Failed registering peer [test_vp0]: [rpc error: code = 2 desc = "grpc: the client connection is closing"] vp0_1 | 19:27:17.934 [crypto] Errorf -> ERRO 025 [validator.test_vp0] Failed registering [test_vp0]: [rpc error: code = 2 desc = "grpc: the client connection is closing"] vp0_1 | 19:27:17.934 [crypto] RegisterValidator -> ERRO 026 Failed registering validator [test_vp0] with name [test_vp0] [rpc error: code = 2 desc = "grpc: the client connection is closing"]. vp0_1 | Error: rpc error: code = 2 desc = "grpc: the client connection is closing"

jeffgarratt
2016-08-23 19:44
@jzhang: could be possible timing issue

jeffgarratt
2016-08-23 19:44
which composition?

jzhang
2016-08-23 19:45
membersrvc: image: hyperledger/fabric-membersrvc:car-lease-demo ports: - "7054:7054" command: membersrvc vp0: image: hyperledger/fabric-peer:car-lease-demo ports: - "7050:7050" - "7051:7051" - "7052:7052" environment: - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=unix:///var/run/docker.sock - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_ID=vp0 - CORE_SECURITY_ENROLLID=test_vp0 - CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT links: - membersrvc command: sh -c "sleep 5; peer node start --peer-chaincodedev"

jzhang
2016-08-23 19:45
both images have customizations in core.yaml and membersvrc.yaml

jeffgarratt
2016-08-23 19:46
ahhh, where is the specification for the membersrvices in vp0?

jeffgarratt
2016-08-23 19:47
as you can see, it appears to be trying to connect to localhost:7054, vs membersvc:7054

jzhang
2016-08-23 19:47
liek this? - CORE_PEER_PKI_ECA_PADDR=membersrvc0:7054 - CORE_PEER_PKI_TCA_PADDR=membersrvc0:7054 - CORE_PEER_PKI_TLSCA_PADDR=membersrvc0:7054

jeffgarratt
2016-08-23 19:47
yes.

jzhang
2016-08-23 19:47
ah that must be it

jeffgarratt
2016-08-23 19:47
but you would remove the 0 for your case

jeffgarratt
2016-08-23 19:47
:slightly_smiling_face:

jzhang
2016-08-23 19:47
yep

jeffgarratt
2016-08-23 19:47
from consensus-base...

jzhang
2016-08-23 19:50
that fixed it. thanks Jeff!

szlaci83
2016-08-23 23:18
Hi, i am trying to set up a 4 validating peer environment. After stopping all docker containers, and deleting the /var/hyperledger/production I always run into the same problem. Vp0- vp2 starts up fine, but for some reason vp3 says that it has already been registered.... ^[[36m17:02:53.386 [main] func1 -> DEBU 00a^[[0m Registering validator with enroll ID: test_vp3 17:02:53.386 [crypto] func1 -> INFO 00b^[[0m Registering validator [test_vp3] with name [test_vp3]... 17:02:53.386 [eventhub_producer] start -> INFO 00c^[[0m event processor started ^[[31m17:02:53.387 [crypto] register -> ERRO 00d^[[0m [validator.test_vp3] Failed registering [test_vp3]: [Already registered.] ^[[31m17:02:53.387 [crypto] register -> ERRO 00e^[[0m [validator.test_vp3] Failed registering [test_vp3]: [Already registered.] 17:02:53.387 [crypto] func1 -> INFO 00f^[[0m Registering vlidator [test_vp3] with name [test_vp3]...done. Already registered or initiliazed. 17:02:53.387 [crypto] func1 -> INFO 010^[[0m Registering validator [test_vp3] with name [test_vp3]...done! ^[[36m17:02:53.387 [main] func1 -> DEBU 011^[[0m Initializing validator with enroll ID: test_vp3 17:02:53.387 [crypto] func1 -> INFO 012^[[0m Initializing validator [test_vp3]... 17:02:53.390 [crypto] func1 -> INFO 013^[[0m Initializing validator [test_vp3]...done!

seva
2016-08-24 00:46
Still no idea as to how to feed transactions to a peer by using GRPC calls with security enabled. Any help?

ccooper21
2016-08-24 05:00
has joined #fabric

wangbin767
2016-08-24 06:11
Have anyone got idea how to deploy the fabric on a virtual machine of DigitalOcean or AWS?

wangbin767
2016-08-24 06:11
It seems the vagrant can only run on a physic machine

ccooper21
2016-08-24 06:14
I'm not sure if it would be a wise idea, but from past experience I believe that Digital Ocean supports nested virtualization. So it should be possible to run Vagrant within one of their VMs. AWS does not support this last time I checked.

ccooper21
2016-08-24 06:24
another possibility is to target Vagrant against something other than VirtualBox by editing "Vagrantfile". I think Vagrant supports EC2 as an example. You'd have to some how migrate the base Virtualbox Hyperledger disk image to an AMI on your own first though I suppose.

geahaad
2016-08-24 06:38
@geahaad has left the channel

wangbin767
2016-08-24 06:44
Thanks @ccooper21, I will do some dig and share my experience later

pascalli
2016-08-24 08:18
Hi, I'm using Vagrant installation, when I use a "query" method on my chaincode, I have a response, but if after this request I use the API (/blocks/'block nb' ) I haven't information concerning this 'query' is it normal ? because if I use an invoke 'method' I have this information. thanks Pascal

hgabor
2016-08-24 08:21
@pascalli do you mean tha t queries are not in the ledger?

pascalli
2016-08-24 08:23
I don't know, but if I request the API /127.0.0.1:5000/blocks/'block nb' I have no information concerning the query transaction, is it norma, a bug or an installation problem ?

hgabor
2016-08-24 08:24
what is block nb?

hgabor
2016-08-24 08:24
block number

hgabor
2016-08-24 08:24
okay so blocks are the parts of the ledger

hgabor
2016-08-24 08:25
ledger is made of blocks, in other words

hgabor
2016-08-24 08:25
but your query is not present in the last block (ot in some other)

hgabor
2016-08-24 08:26
so it is not in the ledger. and yes, this is normal. queries are just queries, as far as I know they are not persisted

pascalli
2016-08-24 08:26
yes not present in the last block, and if I verify all blocks, I have only 'deploy' and 'invoke' methods

hgabor
2016-08-24 08:26
that's the way it works :slightly_smiling_face:

pascalli
2016-08-24 08:27
so, we haven't information in the ledger concerning 'query methods' ?

pascalli
2016-08-24 08:30
ok , thanks for this info :slightly_smiling_face: but how can we check if a query worked well?

hgabor
2016-08-24 09:22
don't you get the result?

alexho
2016-08-24 09:25
@alexho has left the channel

pascalli
2016-08-24 09:41
ah ok yes you are right, I have juste to use the result :slightly_smiling_face:

cm
2016-08-24 11:45
has joined #fabric

cbf
2016-08-24 16:47
@wangbin767 you can deploy docker containers to your vm, you don’t need to deploy vagrant. Use some of the Docker-Compose examples in the /examples folder as a guide

wangbin767
2016-08-24 17:20
Thanks @cbf, I already got ideas after reading some documents.

benbooth
2016-08-24 17:47
has joined #fabric

kletkeman
2016-08-24 18:22
hi ... just noticed that the usage FAQ (https://github.com/hyperledger/fabric/blob/master/docs/FAQ/usage_FAQ.md) retains the notion from the protocol spec that NV nodes maintain a full copy of the ledger for local queries. This would of course require both the chain and world state. My question is whether this has been implemented recently, or is a misstatement as it was the last time I had this discussion on one of the hyperledger channels? Thanks.

kletkeman
2016-08-24 18:23
@muralisr @ghaskins @garisingh Can you take a peek at my question? ^^^

muralisr
2016-08-24 18:29
@kletkeman I don’t know how much of NV got done (ie, will it sync up with the chain…. I didn’t think so but I could be wrong)…. @ghaskins @garisingh @jyellick ?

cm
2016-08-24 18:57
What is the length of a fabric receiving address? Is it the same as sawtooth lake? (34 characters)


nick
2016-08-24 20:22
I am getting a hash sum mismatch error when I try to make a peer

nick
2016-08-24 20:22
i mean build a peer...

ghaskins
2016-08-24 20:25
i think there might be an upstream problem in ubuntu

ghaskins
2016-08-24 20:25
@yacovm was just seeing similar

ramesh
2016-08-24 20:25
I see we are rebuilding images in behave target``` behave-deps: images peer behave: behave-deps @echo "Running behave tests" @cd bddtests; behave $(BEHAVE_OPTS)```

ghaskins
2016-08-24 20:25
I see this from time to time, you just have to wait for them to fix it

ghaskins
2016-08-24 20:26
@ramesh that merely defines the relationship

ghaskins
2016-08-24 20:26
it should only actually run the build if its needed

nick
2016-08-24 20:26
yeah.. i have been facing this since the last two hours or so..

nick
2016-08-24 20:26
thanks ghaskins..

ramesh
2016-08-24 20:29
ok

yacovm
2016-08-24 20:29
and is still seeing...

nikileshsa
2016-08-24 21:55
has joined #fabric

lanski
2016-08-25 02:41
has joined #fabric

pushpalatha
2016-08-25 06:57
has joined #fabric

ankaplan
2016-08-25 12:33
@ankaplan uploaded a file: https://hyperledgerproject.slack.com/files/ankaplan/F24RFL92P/capture.png and commented: Hi! I am trying to develop chaincode on a Docker toolbox environment. Right now, I still try to start and register the example chaincode "chaincode_example02" via "CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:30303 ./chaincode_example02", but I get this message. Do you have an idea why the sample chaincode could not be registered on the peer? I am running the peer and the ca via docker compose.

ashnur
2016-08-25 12:34
maybe wrong port?


ankaplan
2016-08-25 12:38
Hi @ashnur and thanks for the fast answer! Tried 7051 (and some other different addresses and ports) but it is still failing.

lbonniot
2016-08-25 12:40
@ankaplan Have you tried to get the peer container IP address and replace 0.0.0.0 by this address?

ankaplan
2016-08-25 12:52
@ankaplan uploaded a file: https://hyperledgerproject.slack.com/files/ankaplan/F24TCFHFT/capture_differentipadress.png and commented: I tried now to use the peer container IP address, but for both ports 30303 and 7051 I get this error message:

lbonniot
2016-08-25 12:54
Strange, probably due to some docker routing issue. I would suggest to test outside of docker compose to see what's going on :wink:

ankaplan
2016-08-25 12:59
Hmm! Going to try that @lbonniot Thanks :blush:

lbonniot
2016-08-25 12:59
good luck!

cbf
2016-08-25 14:10
@ankaplan are you running natively or in vagrant?

ankaplan
2016-08-25 14:26
Hi @cbf! I used the docker toolbox and started the peer and the ca with docker-compose.yml. But I changed to use the vagrant development environment and could register the chaincode, so issue solved!

cbf
2016-08-25 15:29
ok thanks

cbf
2016-08-25 15:30
heads up everyone. As noted on the mailing list, we will be archiving the existing GH fabric and fabric-api repositories and replacing them with mirrors of Gerrit. Hence, we will be transferring the fabric and fabric-api repository and all the corresponding issues and pull requests to the hyperledger-archives org on GH and replacing this repository with a read-only mirror of our Gerrit source. As a result, any automatic GH redirects will be broken. If you haven't already migrated your PR to Gerrit, and intend to do so, you will need to change your git remote to reference the transferred repository (e.g. git@github.com:hyperledger-archives/fabric) on your local clone.

cbf
2016-08-25 15:31
I am also tagging all open PRs on the Fabric GH repo with this message

ashnur
2016-08-25 15:31
finally, i hope this will reduce the confusion :slightly_smiling_face:

cbf
2016-08-25 15:31
me too;-)

kletkeman
2016-08-25 15:32
@cbf What does this mean for Bluemix HL compatibility? As in, do I need to work using the archive until Bluemix if brought up to date? Or is Bluemix already at Gerrit levels? Sorry if this was answered elsewhere, I'm on vacation and don't really have much time to explore.

kletkeman
2016-08-25 15:33
Just realized that I left out a detail ... I am working on samples for IoT smart contracts, so I am a client of Bluemix HL.

cbf
2016-08-25 15:34
the v0.5-developer-preview branch is what we have deployed. I would recommend making a fork until BMX is caught up with a Gerrit release

kletkeman
2016-08-25 15:34
k, thx

jbrisbin
2016-08-25 15:34
Curious if anyone here is running fabric containers on a Mac using the Docker beta? I’m trying to figure out how to connect say IDEA to my containers but the Mac beta doesn’t route through like the docker-machine based version for Mac did. If this is outside the scope for this channel, sorry.

cbf
2016-08-25 15:34
the Mac beta networking is fairly limited

jbrisbin
2016-08-25 15:36
@cbf so i have to run anything that connects to fabric also in a container? that means no debugging in IDEA… :sadpanda:

jbrisbin
2016-08-25 15:41
@cbf fwiw- I’m looking at Weave to see if this helps: https://www.weave.works/debugging-docker-mac-weave-net/

cbf
2016-08-25 15:42
LMK how that works out… if it works, would love to get that into the docs

nikileshsa
2016-08-25 15:59

satheesh
2016-08-25 16:00
@nikileshsa You are getting this error while gradle is trying to download dependent jars from maven repos

satheesh
2016-08-25 16:01
Do you have a working Internet connection on the machine you are trying to build ?

nikileshsa
2016-08-25 16:02
hi satheesh. yes. my internet connection seems to be ok

satheesh
2016-08-25 16:02
Please join #java-chaincode

nikileshsa
2016-08-25 16:03
sure. thank!

nikileshsa
2016-08-25 16:03
thanks!

cbf
2016-08-25 16:45
the Gerrit repos are now mirrored to GH and we have archived the original repos to hyperledger-archives org

cbf
2016-08-25 16:45
Thanks to @ry for his help making that a reality

kletkeman
2016-08-25 16:49
Wow, that was really painless. Excellent ...

stefan.teis
2016-08-25 17:58
Thanks a lot

troyronda
2016-08-25 17:59
@cbf /@ry - Thanks for getting the mirror setup. One thing to consider - the 0.5 release is now gone (https://github.com/hyperledger-archives/fabric/tree/v0.5-developer-preview) from the new repo releases page: https://github.com/hyperledger/fabric/releases.

ry
2016-08-25 18:03
@troyronda I don’t think we can re-create it, as the exact commits aren’t available

troyronda
2016-08-25 18:04
Our build tool was actually pulling based on this tag so we updated to hyperledger-archives until we are ready to move to the next version.

jbrisbin
2016-08-25 18:25
are there any non-vagrant build instructions for fabric? i’m wanting to just run a docker container and build from there. (mac os x docker 1.12 beta)

cbf
2016-08-25 18:31
@ry @troyronda the v0.5 release is in the archive


ry
2016-08-25 18:32
cbf yes, the issue is people with existing links to it on hyperledger are now broken post-mirroring.

troyronda
2016-08-25 18:33
@cbf - yup - we updated our link.

ry
2016-08-25 18:33
you mentioned this breakage in your email but not this specific break

cbf
2016-08-25 18:33
yep just need to reset your git remote as I indicated in the note this morning

troyronda
2016-08-25 18:34
it was actually a step in our build process that had the link.

troyronda
2016-08-25 18:34
:slightly_smiling_face:

cbf
2016-08-25 18:45
ah

ry
2016-08-25 23:44
@cbf @ghaskins the readme.md is rendering now: https://github.com/hyperledger/fabric TYVM!

cbf
2016-08-25 23:50
cool thx

jchenibm
2016-08-26 01:16
has joined #fabric

sheehan
2016-08-26 01:27
Was there no way to keep the stars/watchers/forks during the transition? That’s something I use when I see a new project to determine if it’s active and interesting to other people

ibmamnt
2016-08-26 01:43
FYI - If you are running non latest fabric code, you may see this error: ```container: API error (400): {"message":"starting container with HostConfig was drecated since v1.10 and removed in v1.12"}```

ibmamnt
2016-08-26 01:44
Docker engine 1.12 was released on Aug/2016. Japanese engineer have found a work around for this. ```# sudo apt-get install docker-engine=1.11.2-0~trusty```


baohua
2016-08-26 01:46
guess the bug has already been fixed, see https://gerrit.hyperledger.org/r/#/c/423/

stylix
2016-08-26 01:49
I don't think we should go backwards to docker 1.11.2. At least, I'm working with docker 1.12.1 (18 Aug), and those problem solved sometime before as baohua said.

ibmamnt
2016-08-26 01:52
I'm using v0.5-developer-preview branch for now (due to some reason).

ibmamnt
2016-08-26 01:54
I'll try to update the source when we are ready.

ry
2016-08-26 01:58
@ibmamnt thanks. we’re using 1.8 for CI be cause 1.12 won’t work. I’ll try 1.11

ramesh
2016-08-26 03:33
@ibmamnt : for quick fix, please do this in v0.5 branch. Comment out this line `err = client.StartContainer(containerID, hostConfig) ` and add `err = client.StartContainer(containerID, nil)` (please refer master branch)

ramesh
2016-08-26 03:33
in `core/container/dockercontroller/dockercontroller.go`

kaustubhoak
2016-08-26 06:41
has joined #fabric

ibmamnt
2016-08-26 08:12
@ramesh. Thanks for the info. I'll try that when I need Docker v1.12 feature. I think the reason for v1.12 is built-in orchestration called "swarm" before. And of course when Docker exhibits serioud security hole, I need to upgrade. I latter case, I'll modify the code for v0.5 or pull latest source.

venkat
2016-08-26 08:34
has joined #fabric

ashnur
2016-08-26 08:35
is it possible to have the chaintool working inside the docker images?

venkat
2016-08-26 08:35
While deployng chaincode (example02) using REST, we are getting the error "Error when deploying chaincode: Error getting chaincode package bytes: Error getting code Getting chaincode took too long"

ashnur
2016-08-26 08:35
wrong channel, srry

venkat
2016-08-26 08:36
This issue is reproduced on faster internet connections as well (in the US)

venkat
2016-08-26 08:38
Are there known issues in using REST for chaincode deployment?

venkat
2016-08-26 08:39
Also, what are the minumum fabric binaries/tools needed on a chaincode dev machine, to deploy a chaincode to a running fabric cluster, using command line?


grapebaba
2016-08-26 09:45
new repo needs more :star:

garisingh
2016-08-26 10:48
@venkat - when using REST, the source for your chaincode needs to be available on the file system and accessible by every peer to which it will be deployed (it would also need to be in the location set by the GOPATH where each peer is running). If you are OK with having your chaincode source stored in a public Github repo, then you don't have to worry about the previous comment as long as the machine where your peer(s) is have access to the internet

venkat
2016-08-26 11:01
@garisingh - I was trying to deploy example02 from the fabric repo (public). In this case why do I run into this error? Yes. the peers have the fast internet connection.

venkat
2016-08-26 11:23
@garisingh - Sorry, I couldn't understand your first comment. How does the chaincode gets into peer in the first place? Doesn't the peer download it?

venkat
2016-08-26 11:27
Also I don't see this requirement in the docs for chaincode developer. Am I missing something?

venkat
2016-08-26 11:29
Also, why can't the dev and deploy of chaincode pretty simple and straight forward for newbies? Does this have to be so hard?

garisingh
2016-08-26 11:57
you can disregard my first comment in this case. the error you are seeing comes from the inability of the peer to download the chaincode source from github

garisingh
2016-08-26 11:58
how are you running the peer?

venkat
2016-08-26 12:00
I'm running inside the vagrant shell - exactly as specified in the docs.

venkat
2016-08-26 12:01
For chaincode deployment, I'm trying REST

venkat
2016-08-26 12:01
A single peer and one member service is running fine

venkat
2016-08-26 12:02
How do I know if the peer has issues in accessing the github?

garisingh
2016-08-26 12:06
what are you passing into the REST call?

venkat
2016-08-26 12:07
{ "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID":{ "name": "mycc", "path": "https://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02/chaincode_example02.go" }, "ctorMsg": { "args":["aW5pdA==", "YQ==", "MTAw", "Yg==", "MjAw"] }, "secureContext": "jim" }, "id": 1 }

garisingh
2016-08-26 13:13
ah -


venkat
2016-08-26 13:32
I'm sure I tried that too (leaving the go file name out from URL). Do you think that si the right way to provide the path for a chaincode? What if there are multiple chaincodes in the same folder? Not allowed?

lhaskins
2016-08-26 13:41
@venkat: Your args also look a bit suspicious. Try something a bit simpler such as: ```{ "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID":{ "path":"http://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02" }, "ctorMsg": { "function":"init", "args":["a", "1000", "b", "2500"] }, "secureContext": "jim" }, "id": 1 } ```

venkat
2016-08-26 13:59
function is is no more allowed in the latest code, I guess?

venkat
2016-08-26 13:59
it need to go into args

venkat
2016-08-26 13:59
and args need to base64-encoded too

venkat
2016-08-27 02:36
@garisingh - I'm still concerned by your first comment regarding the case of private github repo. How does the chaincode gets into peer in the first place? Are there any commandline tools that can upload the chaincode source to a fabric cluster, just like REST API would have done?

suri
2016-08-27 06:39
hi venkat this will work for me execute it

suri
2016-08-27 06:39
{ "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID":{ "path":"http://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02" }, "ctorMsg": { "function":"init", "args":["name", "test", "sal", "2000"] } }, "id": 9 },

suri
2016-08-27 06:41
sorry this is my contract this will work for you

suri
2016-08-27 06:41
{ "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID":{ "path":"http://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02" }, "ctorMsg": { "function":"init", "args":["a", "100", "b", "200"] } }, "id": 9 },

venkat
2016-08-27 12:32
@suri - which vesion (or commit) of the fabric peer code (or image) are you using? I pull peer image from dockerhub. Your peer version seems older version. I want to use your peer version. Can you please share the peer version?

venkat
2016-08-27 12:46
@suri - Running your sample results in error "sending init failed(handler not found for chaincode mycc)".


muralisr
2016-08-27 12:53
@venkat how are you starting the peer ?

muralisr
2016-08-27 12:53
are you starting with —peer-chaincodedev option ?

garisingh
2016-08-27 12:58
from the log, also looks like the Docker daemon is not running?

garisingh
2016-08-27 12:58
``` vp0_1 | 12:42:00.980 [dockercontroller] stopInternal -> DEBU 0fc Remove container dev-vp0-mycc (dial unix /var/run/docker.sock: connect: no such file or directory) ```

garisingh
2016-08-27 12:58
or that the Docker socket was not mounted to the container

muralisr
2016-08-27 13:01
right. and there’s also the “mycc” in the logs. So looked like a few things mixed up

garisingh
2016-08-27 13:09
yeah - true. so if trying to run in dev mode, then the answer is easier - need to start up the chaincode process manually. If not, then need to properly mount the socket and/or use the TCP endpoint of the Docker daemon

adrien
2016-08-27 13:51
has joined #fabric

younker
2016-08-27 14:21
has joined #fabric

venkat
2016-08-27 15:06
@muralisr - here is the docker-compose file I'm using:

venkat
2016-08-27 15:06

venkat
2016-08-27 15:08
First I'm doing a vagrant up from devenv folder of fabric soruce code

venkat
2016-08-27 15:08
Then I do vagrant ssh and then run docker-compose up from inside the vagrant terminal.

muralisr
2016-08-27 15:08
@venkat as @garisingh pointed out, first problem is that your docker is root of the issue

muralisr
2016-08-27 15:09
CORE_VM_ENDPOINT=unix:///var/run/docker.sock is not working

muralisr
2016-08-27 15:12
what does ps -ef | grep docker show ?

venkat
2016-08-27 15:25
@muralisr - it is true that there is no /var/run/docker.sock file. But I'm pretty sure that the docker daemon is running. Also, should that affect the finding of the handler fo chaincode while sending init?

muralisr
2016-08-27 15:27
the chaincode contacts the peer first and registers with it. If the chaincode did not register - because it couldn’t talk to the peers port - then I’d exepect the send init call to fail as well


muralisr
2016-08-27 15:28
is the above from vagrant ?

muralisr
2016-08-27 15:29
looks like its from the mac host...

venkat
2016-08-27 15:30
sorry - here is from inside vagrant

venkat
2016-08-27 15:30

venkat
2016-08-27 15:32
basically the error is is same whether I run the peers from inside vagrant or outside of it.

muralisr
2016-08-27 15:37
ok

muralisr
2016-08-27 15:38
how do you run the chaincode ?

venkat
2016-08-27 15:40
trying to deploy example02 through REST (swagger ui)

muralisr
2016-08-27 15:40
ok

venkat
2016-08-27 15:40
REST UI shows no errors - 200 OK

muralisr
2016-08-27 15:44
a few points : (1) in —peer-chaincodedev mode, you have to run the chaincode yourself in another window (2) you still have to do the “deploy” though… so as to call the “init” method and (3)deploy returns 200 as it just “submits” the request, the execution itself is asynchronous … ie, the 200 just says the “submit” was successful

muralisr
2016-08-27 15:44
finally, you don’t have to run the peer in docker at all… though we can and should get to the bottom of your problem

muralisr
2016-08-27 15:45
if you have not already done that, we can try and get you started without running the peer via compose

venkat
2016-08-27 15:46
Sure -

venkat
2016-08-27 15:46
Shuould I run peer in non-de mode from fabric/peer folder?

muralisr
2016-08-27 15:46
yes please

muralisr
2016-08-27 15:46
as in

muralisr
2016-08-27 15:46
./peer node start —peer-chaincodedev

venkat
2016-08-27 15:47
Ok

muralisr
2016-08-27 15:47
I like the “./peer” as I can just do “go build” and pick up any changes I might have made

muralisr
2016-08-27 15:48
then in a second wind

muralisr
2016-08-27 15:48
window

muralisr
2016-08-27 15:48
cd $GOPATH/src/github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02

venkat
2016-08-27 15:48
start peer in NON-dev mode?

muralisr
2016-08-27 15:48
go build

muralisr
2016-08-27 15:49
lets first try the dev mode (with the —peer-chaincodedev option)

venkat
2016-08-27 15:49
ok

muralisr
2016-08-27 15:53
so in the second window, go build

venkat
2016-08-27 15:53
we need a member srvc as well?

muralisr
2016-08-27 15:54
not necessary if security is disabled

venkat
2016-08-27 15:54
ok

muralisr
2016-08-27 15:54
which by default, is

venkat
2016-08-27 15:54
I ran go build in the example02

muralisr
2016-08-27 15:54
ok

venkat
2016-08-27 15:54
and got a 14 MB file

muralisr
2016-08-27 15:54
ok

muralisr
2016-08-27 15:54
can you do netstat -an | grep LISTEN ?

muralisr
2016-08-27 15:55
want the port peer is listening on

venkat
2016-08-27 15:55
yep - did it

venkat
2016-08-27 15:56

muralisr
2016-08-27 15:59
ok 7051

muralisr
2016-08-27 16:00
is your docker compose still running ?

muralisr
2016-08-27 16:00
likely not

muralisr
2016-08-27 16:00
so

muralisr
2016-08-27 16:01
CORE_PEER_ADDRESS=127.0.0.1:7051 CORE_CHAINCODE_ID_NAME=mycc ./chaincode_example02

muralisr
2016-08-27 16:01
you should see some logs that indicated chaincode has registered

muralisr
2016-08-27 16:03
in a third window you can do `./peer chaincode deploy -n mycc -c ‘{Args: [“init”,”a”,”100”,”b”,”100”]}’`

venkat
2016-08-27 16:03
nope - no docker-compose running

muralisr
2016-08-27 16:03
ok

venkat
2016-08-27 16:04
the chaincode is ready adn listening

venkat
2016-08-27 16:04
16:03:07.932 [shim] DEBU : Received REGISTERED, ready for invocations

muralisr
2016-08-27 16:04
ok. ` ./peer chaincode invoke -n mycc -c '{Args: [“invoke”,”a”,"b","10"]}’`

muralisr
2016-08-27 16:05
but do the deploy first

muralisr
2016-08-27 16:05
and finally

muralisr
2016-08-27 16:06
`./peer chaincode query -n mycc -c '{Args: [“query","a"]}’`

venkat
2016-08-27 16:06
Chaincode argument error: invalid character 'A' looking for beginning of object key string

venkat
2016-08-27 16:07
base64 issue?

venkat
2016-08-27 16:09
ok - ran the deploy after base64 onversion

venkat
2016-08-27 16:09



venkat
2016-08-27 16:18
How do we undeploy the chaincde

venkat
2016-08-27 16:19
I want to correct the depoymennt synta

pvishnum
2016-08-27 16:19
@venkat you are missing quotes for Args ./peer chaincode query -n mycc -c '{"Args": ["query","a"]}'

pvishnum
2016-08-27 16:19
you can just redeploy the chaincode

venkat
2016-08-27 16:20
Deployed again

venkat
2016-08-27 16:20

venkat
2016-08-27 16:21

venkat
2016-08-27 16:22
"handler not found" is the error I always run into - even while using REST.

muralisr
2016-08-27 16:22
only thing I can think of… typo in CORE_CHAINCODE_ID_NAME

muralisr
2016-08-27 16:22
give me a few

muralisr
2016-08-27 16:22
let me make sure it works in my env

muralisr
2016-08-27 16:26
so the following worked on my machine:

muralisr
2016-08-27 16:26
./peer node start --peer-chaincodedev

muralisr
2016-08-27 16:26
CORE_PEER_ADDRESS=127.0.0.1:7051 CORE_CHAINCODE_ID_NAME=mycc ./chaincode_example02

muralisr
2016-08-27 16:27
./peer chaincode deploy -n mycc -c '{"Args": ["init","a","100","b","200"]}'

muralisr
2016-08-27 16:28
./peer chaincode invoke -n mycc -c '{"Args": ["invoke","a","b","10"]}'

muralisr
2016-08-27 16:28
./peer chaincode query -n mycc -c '{"Args": ["query","a"]}'

venkat
2016-08-27 16:28
your peer docker image date?

venkat
2016-08-27 16:29
well - that shouldn't matter


muralisr
2016-08-27 16:30
“Option 1” is pretty much the above if you ignore the “security” options

venkat
2016-08-27 16:31
may be I'll do a vagrant destroy and foloow the steps again. But my main concern is not the command line stuff.

muralisr
2016-08-27 16:31
there have been recent changes to the API and the doc should get updated … for instance it still has “function"

muralisr
2016-08-27 16:31
right

venkat
2016-08-27 16:31
I need REST to be working

muralisr
2016-08-27 16:31
ok

muralisr
2016-08-27 16:31
let me check what I do for REST

venkat
2016-08-27 16:33
I didn't understand what happens with REST - does the peer download the source code for the chaincode from github (in case pblic repo)?

muralisr
2016-08-27 16:35
functionally REST and the CLI are equivalent functionally .. so no difference

muralisr
2016-08-27 16:35
_download the source code for the chaincode from github (in case pblic repo)_ can be done both from CLI and REST

venkat
2016-08-27 16:36
But in case of command line we "ran" the example02 - for registering etc. Does this happen with REST too?

venkat
2016-08-27 16:37
and the chaincode was listening

muralisr
2016-08-27 16:37
the reason for some of the issues you had was because of this usage - "https://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02"

muralisr
2016-08-27 16:39
the peer sees that "http://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02” resolves to identical local package and so will not “download” from the public https:// repo

venkat
2016-08-27 16:39
Ok .

muralisr
2016-08-27 16:39
_But in case of command line we "ran" the example02 - for registering etc. Does this happen with REST too?_ …. yes, in “peer-chaincodedev” mode you can use REST (as opposed to CLI)… although there were some errors in REST due to recent changes. Not sure if they have been fixed. If not they should be fixed soon

muralisr
2016-08-27 16:41
now

muralisr
2016-08-27 16:41
if you like we can try without dev mode

muralisr
2016-08-27 16:41
./peer node start

venkat
2016-08-27 16:42
I tried that earlier and posted about errors here. May be I should do vagrant destroy first.

muralisr
2016-08-27 16:42
well

muralisr
2016-08-27 16:43
lets try this first ? I think likely it was not vagrant (but you could be right)

venkat
2016-08-27 16:43
ok - lets go ahead

muralisr
2016-08-27 16:43
let me run in my env and copy past

venkat
2016-08-27 16:46
started with ./peer node start

muralisr
2016-08-27 16:48
CORE_LOGGING_LEVEL=debug ./peer chaincode deploy -p http://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Args": ["init","a","100","b","200"]}'

muralisr
2016-08-27 16:48
it will dump out a long hex ID

venkat
2016-08-27 16:48
first run this ? -

venkat
2016-08-27 16:48
CORE_PEER_ADDRESS=127.0.0.1:7051 CORE_CHAINCODE_ID_NAME=mycc ./chaincode_example02

muralisr
2016-08-27 16:49
nope… that’s needed only in -peer-chaincodedev moe

venkat
2016-08-27 16:49
got it

muralisr
2016-08-27 16:49
ok

muralisr
2016-08-27 16:51
use the dumped out id as the “-n” param in invoke and query

muralisr
2016-08-27 16:51
CORE_LOGGING_LEVEL=debug ./peer chaincode invoke -n df367164cdae32dfd794d41cecb877d5617e234434c76161acdbce78b3b758240336948d84e91e53ae36afca0266690ab1cdbdcd2778ef66ffca6f5982148d45 -c '{"Args": ["invoke","a","b","10"]}'

venkat
2016-08-27 16:51
for the chaincode spec is asking for Function parameter. So added it

muralisr
2016-08-27 16:51
really ?

muralisr
2016-08-27 16:51
ok

muralisr
2016-08-27 16:52
then maybe you are a few levels back

venkat
2016-08-27 16:52

muralisr
2016-08-27 16:53
try without the “init” in "Args"

venkat
2016-08-27 16:53
ok - will try again

venkat
2016-08-27 16:53
yep

muralisr
2016-08-27 16:53
the recent changes remove “Function” let user specify differentiation via Args

venkat
2016-08-27 16:54
the peer binary that I'm using could be a week old

muralisr
2016-08-27 16:54
ok

venkat
2016-08-27 16:54
but docker images are latest

muralisr
2016-08-27 16:54
ok

venkat
2016-08-27 16:54
looks ike all good

muralisr
2016-08-27 16:55
ok

venkat
2016-08-27 16:55

muralisr
2016-08-27 16:55
ok

muralisr
2016-08-27 16:55
use 9cedb066b856e59118f806efaef96326bd0265ac503faa0980e45e8c6662706931d272ac90e76a46f2bbb27e968b24a390b99350369c403b01f55c984cd6fc40 as “-n” param in invoke and query

muralisr
2016-08-27 16:59
btw, if the deploy was successfully executed `docker ps` should show the chaincode container running

venkat
2016-08-27 16:59
invoke is going fine

venkat
2016-08-27 16:59

muralisr
2016-08-27 16:59
proof of the pudding is the query

muralisr
2016-08-27 17:00
as invoke is also a submission (ie, asynch)

muralisr
2016-08-27 17:00
query is synchronous

venkat
2016-08-27 17:01

muralisr
2016-08-27 17:02
there you go :slightly_smiling_face:

muralisr
2016-08-27 17:02
so the invoke query etc could also be done equivalently in REST

venkat
2016-08-27 17:02
ok - trying swagger

muralisr
2016-08-27 17:03
although I thought REST is being fixed in latest

muralisr
2016-08-27 17:03
but perhaps will work in your level

venkat
2016-08-27 17:04
deploy is the only problem for me- my chaincode source is in a github repo - and we want our testing team to deploy through REST

venkat
2016-08-27 17:05
without having to deal with building fabric code etc

muralisr
2016-08-27 17:05
so

muralisr
2016-08-27 17:06
you can deploy from a public repo successfully (with CLI even)

muralisr
2016-08-27 17:06
is that github repo public ?

muralisr
2016-08-27 17:07
the other option is to use the SDK

venkat
2016-08-27 17:07
I will try deploying REST on the NON-dev peer

muralisr
2016-08-27 17:07
ok

venkat
2016-08-27 17:07
because it worked from commandline

muralisr
2016-08-27 17:09
ok

venkat
2016-08-27 17:12
deploy work from REST too - but I believe it is because I'm using older version of peer binary

venkat
2016-08-27 17:13
If I use docker images, then none of this works

muralisr
2016-08-27 17:21
it should work too …in theory

muralisr
2016-08-27 17:24
the key would be to get the ip address to communicate with the peer’s container

muralisr
2016-08-27 17:24
using docker inspect

muralisr
2016-08-27 17:25
and using that

venkat
2016-08-27 17:26
in case of docker, i guess the example package doesn't already exist locally

muralisr
2016-08-27 17:26
it will be in the peer

muralisr
2016-08-27 17:27
are you using the above compose file to run the peer ?

venkat
2016-08-27 17:27
right

muralisr
2016-08-27 17:27
ok

muralisr
2016-08-27 17:27
give me a few

venkat
2016-08-27 17:27
what if the chaincode is outside the fabric source code? It won't be available in the peer image.

venkat
2016-08-27 17:43
And why should the example chaincodes be bundled with peer images?

muralisr
2016-08-27 17:49
chaincode does not have to be in the fabric… the examples are bundled in the fabric

muralisr
2016-08-27 17:49
not sure if you have used the SDK but that allows you provide chaincode from outside of the peer

muralisr
2016-08-27 17:49
also this area is evolving and will get better

muralisr
2016-08-27 17:50
so with the compose..

muralisr
2016-08-27 17:51
docker-compose -f `compo` up --force-recreate where `compo` is

muralisr
2016-08-27 17:51
vp0: image: hyperledger/fabric-peer ports: - "7050:7050" - "7051:7051" - "7052:7052" environment: - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=unix:///var/run/docker.sock - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_ID=vp0 command: sh -c "sleep 5; peer node start"

muralisr
2016-08-27 17:51
oops hang on

muralisr
2016-08-27 17:53
vp0: image: hyperledger/fabric-peer ports: - "7050:7050" - "7051:7051" - "7052:7052" environment: - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=unix:///var/run/docker.sock - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_ID=vp0 command: sh -c "sleep 5; peer node start —peer-chaincodedev"

muralisr
2016-08-27 17:54
then I do `docker ps` to get the container the peer is running

muralisr
2016-08-27 17:54
vagrant@hyperledger-devenv:v0.0.10-061e064:/opt/gopath/src/github.com/hyperledger/fabric/peer$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 59f1719623b8 hyperledger/fabric-peer "sh -c 'sleep 5; peer" 2 minutes ago Up 2 minutes 0.0.0.0:7050-7052->7050-7052/tcp tmp_vp0_1

muralisr
2016-08-27 17:54
then I do `docker inspect 59f1719623b8` to get the ip adddress

muralisr
2016-08-27 17:54
"IPAddress": "172.17.0.2",

muralisr
2016-08-27 17:54
use that ip in all my commands

muralisr
2016-08-27 17:55
CORE_PEER_ADDRESS=172.17.0.2:7051 CORE_CHAINCODE_ID_NAME=mycc ./chaincode_example02

muralisr
2016-08-27 17:55
CORE_PEER_ADDRESS=172.17.0.2:7051 ./peer chaincode deploy -n mycc -c '{"Args": ["init","a","100","b","200"]}'

muralisr
2016-08-27 17:55
etc

venkat
2016-08-27 17:56
ok, I'll do the same ..

muralisr
2016-08-27 17:56
I ran without memservice

muralisr
2016-08-27 17:57
for quick test

venkat
2016-08-27 18:10
you are using peer binary from command line, to deploy. Can you use REST, instead

venkat
2016-08-27 18:11
ah - may be I should have started docker peer in non-dev mode

muralisr
2016-08-27 18:15
you can use rest too

muralisr
2016-08-27 18:15
and you can do that in dev mode

muralisr
2016-08-27 18:16
in any case the recent api changes hopefully settles down soon

venkat
2016-08-27 18:23
ok - Thanks for spending so much time helping me Murali.

venkat
2016-08-27 18:23
Am going to bed now

venkat
2016-08-27 18:23
talk to you later

muralisr
2016-08-27 18:54
sure thing

szlaci83
2016-08-28 02:30
hi im trying to run 4 peers with pbft using v0.5 of fabric and i get this error after deploying chaincode: ^[[36m02:27:24.930 [consensus/obcpbft] unicastOne -> DEBU 5cf^[[0m could not send to replica 1: Message handler not found for receiver vp1 ^[[36m02:27:24.930 [consensus/obcpbft] unicastOne -> DEBU 5ce^[[0m could not send to replica 3: Message handler not found for receiver vp3 ^[[36m02:27:24.931 [consensus/obcpbft] unicastOne -> DEBU 5d0^[[0m could not send to replica 2: Message handler not found for receiver vp2 0 Replica 0 found incorrect signature in view-change message: Could not verify message from vp0

venkat
2016-08-28 11:49
Docker errors while REST for chaincode deployment



garisingh
2016-08-28 11:52
@venkat - same as yesterday, correct?

garisingh
2016-08-28 11:52
how are you running the peers?

garisingh
2016-08-28 11:52
the peer cannot connect to the Docker daemon

venkat
2016-08-28 11:52
my compose file

venkat
2016-08-28 11:53

venkat
2016-08-28 11:54
yes Gari -I worked with Murali last night, could only make it work from the commandline

garisingh
2016-08-28 11:55
right - the issue is that when running in a container, the peer does not have access to `unix:///var/run/docker.sock`

venkat
2016-08-28 11:56
ps -ef | grep docker output

venkat
2016-08-28 11:56

venkat
2016-08-28 11:56
the user vagrant is a member of docker group

venkat
2016-08-28 11:57
sorry missed your comment -about peer not ahving access to docker.sock

venkat
2016-08-28 11:58
if so, how can th peer start a container for th chaincode?

garisingh
2016-08-28 12:04
there are 2 ways - 1) configure the Docker daemon on the host to listen on TCP, e.g. start the Docker daemon and pass in `-H ` then configure `CORE_VM_ENDPOINT=http://172.17.0.1:2375` (assuming that that's the address for docker0)

garisingh
2016-08-28 12:04
other option is to mount the socket as a volume: ``` vp0: image: hyperledger/fabric-peer ports: - "7050:7050" - "7051:7051" - "7052:7052" environment: - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=unix:///var/run/docker.sock - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_ID=vp0 volumes: - /var/run/docker.sock:/var/run/docker.sock command: sh -c "sleep 5; peer node start" ```

venkat
2016-08-28 12:10
ok - trying it out ..

maheshpatil13
2016-08-28 12:12
has joined #fabric

maheshpatil13
2016-08-28 12:13
Getting error build peer

maheshpatil13
2016-08-28 12:13
no buildable Go source files in /root/go/src/github.com/hyperledger/fabric/core/crypto/attributes/proto


venkat
2016-08-28 12:13
That is what is used by the default vagrant up

venkat
2016-08-28 12:14
looks like it already using -H

garisingh
2016-08-28 12:17
ah - ok

garisingh
2016-08-28 12:17
what does `ifconfig docker0` show?

venkat
2016-08-28 12:17
Awsome - it works now with `CORE_VM_ENDPOINT=http://172.17.0.1:2375

venkat
2016-08-28 12:17
No erros

garisingh
2016-08-28 12:18
cool

venkat
2016-08-28 12:18
I thiknk the docker.sock option should be removed from the documentation

garisingh
2016-08-28 12:19
yes

venkat
2016-08-28 12:19
Was the base64 requirement for chaincode spec removed ? I used plaintext

garisingh
2016-08-28 12:20
I am not sure on that actually - I lost track of that discussion

garisingh
2016-08-28 12:20
@hgabor ^^^^

venkat
2016-08-28 12:21
no probs. Also i was wondering if we can stop that log messages ...

venkat
2016-08-28 12:21

venkat
2016-08-28 12:22
it is pumping out too many of those

venkat
2016-08-28 12:24
@garisingh - Thanks for the help!

garisingh
2016-08-28 12:24
sure thing

szlaci83
2016-08-28 19:16
@venkat Have you tried pbft on your peers?


nikileshsa
2016-08-29 04:59
am i missing something here?

nikileshsa
2016-08-29 05:07
CORE_VM_ENDPOINT=http://172.17.42.1:2375 CORE_LOGGING_LEVEL=DEBUG CORE_PEER_ID=vp2 CORE_PEER_ADDRESSAUTODETECT=false CORE_PEER_ADDRESS=128.107.21.212:7051 CORE_PEER_DISCOVERY_ROOTNODE=128.107.21.204:7051 peer node start

nikileshsa
2016-08-29 05:07
this is how I start the process.

stylix
2016-08-29 05:19
I think 7051 is for REST API. This variable is for gRPC, which is by default, setting the port to 30303 CORE_PEER_ADDRESS=128.107.21.212:30303 CORE_PEER_DISCOVERY_ROOTNODE=128.107.21.204:30303 will work. But if you need to change the port of gRPC, you need to change this together CORE_PEER_PORT=30303 CORE_PEER_LISTENADDRESS=0.0.0.0:30303 In case if you need to change REST API port, you need this one instead, CORE_REST_ADDRESS=0.0.0.0:7051

nikileshsa
2016-08-29 05:32
@nikileshsa uploaded a file: https://hyperledgerproject.slack.com/files/nikileshsa/F25RBALJJ/pasted_image_at_2016_08_28_10_31_pm.png and commented: Thanks @stylix .. but i see from the Vagrant file.. the following port mapping.. it says 7051 is for grpc

stylix
2016-08-29 05:34
Ahh, sorry, 30303 was an old default port right now.

stylix
2016-08-29 05:35
Probably, you need to check if your containers are working right.

nikileshsa
2016-08-29 05:39
oh ok...got it..

uday.chaudhari
2016-08-29 05:59
has joined #fabric

hgabor
2016-08-29 07:16
@garisingh we have merged this change to the REST API works as it used to before https://gerrit.hyperledger.org/r/#/c/639/


venkat
2016-08-29 08:45
@hgabor - the ChaincodeInput still expects a single argument Args [][]byte , right?

venkat
2016-08-29 08:45
Should that be base64 encoded?

hgabor
2016-08-29 08:47
@venkat it still needs a single args parameter yes, but it can be string, the commit I referenced tries to achieve that strings are supported

joseph
2016-08-29 09:25
Hi all,

joseph
2016-08-29 09:25
I see a sample code

joseph
2016-08-29 09:25
test('Enroll Alice', function (t) { getUser('Alice', function (err, user) { if (err) { fail(t, "enroll Alice", err); // Exit the test script after a failure process.exit(1); } alice = user; alice.getUserCert(null, function (err, userCert) { if (err) { fail(t, "Failed getting Application certificate."); // Exit the test script after a failure process.exit(1); } alicesCert = userCert; pass(t, "enroll Alice"); }) }); });

joseph
2016-08-29 09:28
The userCert is an Ecert?

suri
2016-08-29 11:02
hi any body know difference between hyperledger faric and sawtooth lake.Any body knows tell me

cbf
2016-08-29 12:50
well, one difference is that STL is python and fabric is (mostly) go

cbf
2016-08-29 12:51
we have different models for dealing with “smart contracts”

cbf
2016-08-29 12:51
and STL has a very pluggable consensus model as it was (I believe) written with an original objective of enabling rapid experimentation with different consensus models

cbf
2016-08-29 12:52
fabric also has a primary focus of enabling “permissioned” blockchains - eg no mining, but closed network of members known to each other

bfuentes
2016-08-29 15:29
STL implements other consensus algoritms, some depends on an Intel chipset , other on a new Proof-of-x

bfuentes
2016-08-29 15:30
Proof of Elapsed Time (PoET)

garisingh
2016-08-29 15:34
`STL is python` - LOL - I missed the context - thought you were talking about Standard Template Library :wink:

garisingh
2016-08-29 15:34
too many acronyms :;

hgabor
2016-08-29 15:43
STL = stop the line,... Sorry just joking

garisingh
2016-08-29 15:43
:wink:

venkat
2016-08-29 16:51
Does anyone know why we get the error - LedgerError - ResourceNotFound: ledger: resource not found)

garisingh
2016-08-29 16:51
usually race condition with chaincode

venkat
2016-08-29 16:51
Error when querying chaincode: Error:Failed to launch chaincode spec(Could not get deployment transaction for ...

venkat
2016-08-29 16:52
race condition with chaincode?? what can I do to avoid tha?

garisingh
2016-08-29 16:52
in that case, chaincode was not properly deployed or deployment did not complete. Remember that a reply transaction is asynchronous. So until your chaincode containers are actually running, you'll get that error

garisingh
2016-08-29 16:53
you typically have to wait some period of time (depends on where you are running) between deploy and query.

venkat
2016-08-29 16:53
so - the chaincode contanier is not running or not ready ?

venkat
2016-08-29 16:54
hmm ...

venkat
2016-08-29 16:56
that's right. I have only 4 peers and 1 memsvc containers running

muralisr
2016-08-29 16:56
likely the deploy did not really succeed

muralisr
2016-08-29 16:56
the peer logs would confirm that

venkat
2016-08-29 16:57
there was no indication of deploy failure, though ..

venkat
2016-08-29 16:57
have to check if the peer was able to launch the chaincode container

muralisr
2016-08-29 16:58
deploy and invoke are “submits” and the actual execution is asynchronous ( if you recall :slightly_smiling_face: …its easy to overlook till you get used to it)

venkat
2016-08-29 16:59
oh - ok. But enough time has elapsed between deploy and query - a few minutes. Should be good enough?

muralisr
2016-08-29 16:59
it should be… unless the execution failed

muralisr
2016-08-29 16:59
let me rephrase

muralisr
2016-08-29 17:00
it should be… which makes me think the exeuction failed

venkat
2016-08-29 17:00
ok - got it

muralisr
2016-08-29 17:00
what did you try to deploy ?

venkat
2016-08-29 17:00
example02 :slightly_smiling_face:

venkat
2016-08-29 17:00
using docker-compose for 4 peers pbft

muralisr
2016-08-29 17:01
ok

venkat
2016-08-29 17:01

muralisr
2016-08-29 17:01
time to look at peer log :slightly_smiling_face:

venkat
2016-08-29 17:04
it is just spitting out to consle, currenlty

venkat
2016-08-29 17:04
will snip the relevant parts

venkat
2016-08-29 17:06

garisingh
2016-08-29 17:07
@venkat - my guess is that possibly your 4 peers are not using the right value(s) for `CORE_PEER_ID` ?

garisingh
2016-08-29 17:08
should be `vp0`, `vp1`, `vp2`, `vp3`

venkat
2016-08-29 17:08
yep - they are vp0, vp1, vp2, vp3

venkat
2016-08-29 17:10

venkat
2016-08-29 17:11
That's the only suspicious line

ramesh
2016-08-29 17:36
Venkat, please update `CORE_PEER_DISCOVERY_ROOTNODE` to =`172.17.0.3:7051`

venkat
2016-08-29 18:11
ok - so, you want it connect directly to the root node instead of the V_ENDPOINT? Am trying it now.

venkat
2016-08-29 18:29
not working ramesh. peers are exiting.

ramesh
2016-08-29 18:30
ok can you please send me your docker-compose file..

venkat
2016-08-29 18:30
sure

ramesh
2016-08-29 18:30
I will look into it also let me know which commit level you are using

venkat
2016-08-29 18:30
ok

pvishnum
2016-08-29 21:05
Hi everyone.. I would like open up discussion about few changes to Peer. Please comment. As of now, chaincode deployment works like this at a very high level. 1) chaincode source is packaged and sent to Peer for deployment. 2) Peer creates a docker image and starts the container and manages the lifecycle of the chaincode containers. Some of the disadvantages I see.. 1) Deploying chaincode takes longer. 2) Deploying means actually compiling source and creating a docker image on production servers. This is unnecessary and adds no value compared to starting a pre-built image. 3) Adding chaincode support for new programming language(s) requires changes to 'peer'. I suggest "peer deploy" command should use the published docker image and starts a container.. This will avoid the above disadvantages.

pvishnum
2016-08-29 21:59
one clarification.. docker image doesn't need to be published to docker hub. It can be in a private docker registry

ghaskins
2016-08-29 22:52
This isn't tenable for a variety of use cases

ghaskins
2016-08-29 22:54
The relationship of the code and it's binary needs to be carefully controlled and driven through consensus. You lose that if the peers don't compile the code themselves

ghaskins
2016-08-29 22:55
That said, I think there are more efficient distribution models than those employed right now

pvishnum
2016-08-29 23:17
@ghaskins trying to understand... why is the deployment of code driven through consensus?

vkandy
2016-08-30 03:20
has joined #fabric

shichaoyuan
2016-08-30 03:20
has joined #fabric

yacovm
2016-08-30 05:23
So that all *honest* peers will deploy the same chaincode

baohua
2016-08-30 05:56
@pvishnum Glad see your proposal. I also thought this idea before, but there are several disadvantages, a major one is about how to trust the existed image (to achieve that, lots need to change for the arch). However, I believe we should consider to make this process faster (e.g., caching, hot-loading), and less than 5 seconds should be good enough.

jonathanlevi
2016-08-30 08:34
----- Reminder: @jonathanlevi is on holiday until next Tuesday, and has extremely limited internet access. -----

suri
2016-08-30 09:37
Any telll me fuction differences between hyperledger fabric and sawtoothlake. and why we are using hyperledger fabric only

hgabor
2016-08-30 09:48
@suri by we, who do you mean? :slightly_smiling_face: I am using that because I am a fabric developer. :slightly_smiling_face: as I know sawtooth uses POET and has a different architecture

suri
2016-08-30 09:50
thanks

suri
2016-08-30 09:51
i am new to the hyperledger i have doubt which one we have to use thats why i asked

hgabor
2016-08-30 09:57
last time this topic was brought up it seemed to me that there was no 'comparison chart' or something similar for the two systems (fabric and stl)

poly
2016-08-30 10:19
has joined #fabric

bartman250
2016-08-30 10:25
has joined #fabric

jake.turner
2016-08-30 12:02
has joined #fabric

hfeeki
2016-08-30 13:22
has joined #fabric

hfeeki
2016-08-30 13:23
Does fabric can support head only sync now or plan to support ?

cbf
2016-08-30 13:46
@suri not sure I understand “and why we are using hyperledger fabric only"

cbf
2016-08-30 13:47
this is the fabric channel, so the discussion tends to be more specific to the fabric. If you want to discuss the merits of each (fabric and sawtooth) suggest the #general or the #architecture channel wold be better suited

cbf
2016-08-30 13:48
both have their positive and negative attributes, like a parent and their children, hyperledger loves them both;-)

ashnur
2016-08-30 13:51
Honestly, it seems to me that sawtooth is hugely dependent on the intel SGX architecture, and I haven't had the time to fully understand what is going around with that.

amundson
2016-08-30 14:50
@ashnur, the current implementation of poet uses sgx, but your description is not accurate for sawtooth as a whole. consensus is pluggable. welcome discussion on #sawtooth

cheyi
2016-08-30 15:35
has joined #fabric

chainsaw
2016-08-30 16:14
has joined #fabric

garisingh
2016-08-30 16:24
@amundson - is there an implementation of poet which actually use SGX if you have the right hardware (and enabled in BIOS) or is it still using an emulator?

cbf
2016-08-30 16:32
@amundson glad you’re monitoring;-)

amundson
2016-08-30 16:37
@garisingh - yes, definitely, though not in sawtooth-core currently. message @kelly and he can provide details.

garisingh
2016-08-30 16:46
thanks - will do

nikileshsa
2016-08-30 17:43
@nikileshsa uploaded a file: https://hyperledgerproject.slack.com/files/nikileshsa/F26FN66BF/pasted_image_at_2016_08_30_10_42_am.png and commented: Hi all. I am trying to build a peer in my cluster and i am getting the following error related to protos. Is anyone else experiencing this?

yacovm
2016-08-30 17:54
Can you clone your code again?

yacovm
2016-08-30 17:54
A protobuff related commit was merged today

yacovm
2016-08-30 17:55
It reverts some stuff that *may* have caused this

vkandy
2016-08-30 18:05
Hey! it maybe a stupid question but anyways. Is the naming of peer ids just a conventions (vp0, vp1... vpN) or can I change the names and enrollIds . I am using docker images BTW. and I get this error: `[validator.alberta_admin] Failed invoking CreateCertficatePair [rpc error: code = 2 desc = "Identity lookup error: sql: no rows in result set"].`

tuand
2016-08-30 18:08
if you are using PBFT consensus, you must name the peers as vp0, vp1 ... vpN

tuand
2016-08-30 18:09
The IDs used for logins can be listed in the membersrvc yaml file

nikileshsa
2016-08-30 18:09
@yacovm. Thanks! Will try that...Also I had a chat with ghaskins and he suggested it may be because of the protoc version. I am currently using protoc version 3.0.0 and I am told that we have to be using https://github.com/google/protobuf/releases/tag/v3.0.0-beta-3

vkandy
2016-08-30 18:09
I see. thanks @tuand

ghaskins
2016-08-30 18:23
To add background to the conversation with @nikileshsa, current master currently uses protobuf v3-beta3 (devenv v0.0.10) but we are actively working on upgrading to the v3.0.0 release

ghaskins
2016-08-30 18:23
(devenv v0.0.11)

ghaskins
2016-08-30 18:23
once that happens, those of you that use the vagrant devenv will need to vagrant destroy+up

ghaskins
2016-08-30 18:23
those of you that roll your own, you’ll need to upgrade manually

ghaskins
2016-08-30 18:23
we will send out a notice on the ML/slack when this happens

nikileshsa
2016-08-30 21:53
@nikileshsa uploaded a file: https://hyperledgerproject.slack.com/files/nikileshsa/F26JSUWJ3/pasted_image_at_2016_08_30_02_53_pm.png and commented: the grpc server in one of my nodes keeps crashing with the following error

nikileshsa
2016-08-30 21:56
`error: accept tcp[::] 7051 accep4: too many open files.`

nikileshsa
2016-08-30 21:57
I see some issue in github regarding this https://github.com/hyperledger/fabric/issues/651 . but this link is broken obviously. is there a way to view the state of this issue


tuand
2016-08-30 22:00
check the hyperledger-fabric mailing list. There's a post about archiving the github repos

nikileshsa
2016-08-30 22:05
missed this archives link! thanks tuand!

julio
2016-08-30 23:42
has joined #fabric

julio
2016-08-30 23:43
Is it possible to deploy a chaincode from a private repo? If not, what’s the best deployment strategy to do it?

ghaskins
2016-08-30 23:52
@julio yes, you can either use the SDK, or you can run an NVP within your private domain

ghaskins
2016-08-30 23:52
then you can deploy chaincode from wherever you like, as long as it is accessible to the SDK/NVP node

julio
2016-08-30 23:53
@ghaskins Which sdk are you referring to?


ghaskins
2016-08-30 23:55

ghaskins
2016-08-30 23:55
note that I believe the NVP/REST method is being deprecated at some point, though

ghaskins
2016-08-30 23:55
so, the SDK route has more long term viability

julio
2016-08-31 01:12
@ghaskins I’m not sure I understand. Will the node sdk download the git project or just forward the request to hyperledger?

ghaskins
2016-08-31 01:19
it will download it

ghaskins
2016-08-31 01:20
the SDK/NVP will do the URL->bytes translation, turning the request into a payload that is then broadcast on the consensus network

ibmamnt
2016-08-31 03:53
I found the problem of using v3.0.0-beta-3 that I can not create base image from scratch. This is not a problem of fabric, but "autogen.sh" in protobuf. The gmock has been merged to GoogleTest. As a result, the link is invalid. Here is a fix to autogen.sh.

ibmamnt
2016-08-31 03:54
```- curl $curlopts -O https://googlemock.googlecode.com/files/gmock-1.7.0.zip - unzip -q gmock-1.7.0.zip - rm gmock-1.7.0.zip - mv gmock-1.7.0 gmock + curl $curlopts -L -O https://github.com/google/googlemock/archive/release-1.7.0.zip + unzip -q release-1.7.0.zip + rm release-1.7.0.zip + mv googlemock-release-1.7.0 gmock + + curl $curlopts -L -O https://github.com/google/googletest/archive/release-1.7.0.zip + unzip -q release-1.7.0.zip + rm release-1.7.0.zip + mv googletest-release-1.7.0 gmock/gtest```

ibmamnt
2016-08-31 04:14
Actually, this modification might be easier. file=<fabric>/images/base/scripts/common/setup.sh ```cd /tmp curl -s -O https://raw.githubusercontent.com/google/protobuf/master/autogen.sh git clone https://github.com/google/protobuf.git cd protobuf git checkout v3.0.0-beta-3 cp ../autogen.sh . ``` Hope this helps who has similar issue with me.

bgorman
2016-08-31 07:36
does anyone know how to configure the Gradle builds to use a proxy? (I'm running the vagrant VM)

novusopt
2016-08-31 11:43
@bgorman: i think you mean the javabuild.sh file?

novusopt
2016-08-31 11:44
if yes, then please use the commands as following: gradle -Dhttp.proxyHost=<proxy ip> -Dhttps.proxyHost=<proxy ip> -Dhttp.proxyPort=<proxy port>-Dhttps.proxyPort=<proxy ip>-q -b ${PARENTDIR}/core/chaincode/shim/java/build.gradle clean gradle -Dhttp.proxyHost=<proxy ip> -Dhttps.proxyHost=<proxy ip> -Dhttp.proxyPort=<proxy port>-Dhttps.proxyPort=<proxy ip> -q -b ${PARENTDIR}/core/chaincode/shim/java/build.gradle build

balakrishna
2016-08-31 12:03
Hi, can someone tell me how to create new ECert/TCert for role based access for new user accounts in fabric

novusopt
2016-08-31 12:14
@balakrishna you mean you want to use custom users?

balakrishna
2016-08-31 12:15
yes. i want to register new users

balakrishna
2016-08-31 12:16
@novusopt yes, i want to register new user

garisingh
2016-08-31 12:23
@balakrishna - assuming you want to register users "dynamically" (i.e. not adding them to the yams file), then you'll want to use the NodeJS SDK in order to do this. https://github.com/hyperledger/fabric/blob/master/sdk/node/test/unit/registrar.js is a good unit test which shows the code needed to do this

jzhang
2016-08-31 12:55
anybody seeing the error below? I have a local setup with docker-compose running inside Docker on Mac (not docker tools). To get this environment working, I had to manually pull hyperledger/fabric-baseimage:x86_64-0.0.10 and tag it with “latest”. Then I got the following error when deploying chaincode.


jzhang
2016-08-31 12:56
I noticed an issue was opened in the old github but has since been closed: https://github.com/hyperledger-archives/fabric/issues/2362

novusopt
2016-08-31 13:16
@balakrishna the approach suggested by garisingh is correct

novusopt
2016-08-31 13:22

jzhang
2016-08-31 13:43
about the error above, I had the setup running fine for a while until yesterday I cleaned up all images and restarted from scratch

jzhang
2016-08-31 13:44
@baohua @ghaskins any pointers regarding my question above?

jenkins
2016-08-31 14:54
When writing client applications for hyperledger, that is applications that will invoke and query the chaincode, what’s the best/idiomatic way to unwrap the data structures returned by chaincode?

ghaskins
2016-08-31 14:57
@jenkins I would encourage you to check out https://github.com/hyperledger/fabric-chaintool

ghaskins
2016-08-31 14:58
full disclosure, I am the author

ghaskins
2016-08-31 14:58
that said, alternatives exist such as using some other serialization format like json

jenkins
2016-08-31 15:00
@ghaskins Thanks, I’ll look into this. Mind if I PM you here if I run into anything I can’t work around?

ghaskins
2016-08-31 15:00
of course

jenkins
2016-08-31 15:01
@ghaskins Thanks again.

ghaskins
2016-08-31 15:01
fyi, there were a few changes to fabric mainline recently that may require some updates to chaintool, so theres a chance we will run into this

ghaskins
2016-08-31 15:01
but I can help you work through them, it will motivate me to fix the issues sooner rather than later

nikileshsa
2016-08-31 16:53
Hi guys. I am running 4 peers outside of vagrant using PBFT consensus. The peers keep exiting with the following error - error: accept tcp[::] 7051 accept: too many open files. I tried starting all the four peers at near same time and the first peer exited in around 20 mins and the rest of the peers exits with error in 50 mins time. I tried to increase the no. of open files limit as suggested in a similar issue https://github.com/hyperledger-archives/fabric/issues/651.

nikileshsa
2016-08-31 16:54
I tried increasing to 10000 and then to a larger value and I see the issue is still reproducible.

nikileshsa
2016-08-31 16:55
tried increasing the open file limit* to 10000

nikileshsa
2016-08-31 16:56
peer --version Fabric peer server version 0.6.0-SNAPSHOT-fdaaff1

nikileshsa
2016-08-31 16:57
$ ulimit -Hn 100000

nikileshsa
2016-08-31 16:58
Is anyone aware of similar issues in this version

nikileshsa
2016-08-31 16:58
?

nikileshsa
2016-08-31 17:21
I would like to add to the above description that I wasn't posting any transactions and the peers exit with error in idle state.

julio
2016-08-31 17:51
@ghaskins I tried looking for the function that does the URL to bytes translation but can’t find it. Could you please point it out to me?

ghaskins
2016-08-31 17:52
i can show you the NVP side, not sure about the SDK

ghaskins
2016-08-31 17:53
this is what is invoked on the NVP in the deploy of type GOLANG https://github.com/hyperledger/fabric/blob/master/core/chaincode/platforms/golang/package.go#L33

ghaskins
2016-08-31 17:53
each of the supported platforms has a similar function: https://github.com/hyperledger/fabric/tree/master/core/chaincode/platforms

ghaskins
2016-08-31 17:53
the resulting tarball is what is disseminated to peers

ghaskins
2016-08-31 17:54
the SDK has an equivalent function, as I worked with the SDK devs during its creation, but I am not familiar with the code to point to it

ghaskins
2016-08-31 17:54
all I know is that this logic was ported to TypeScript in the SDK, IIUC

ghaskins
2016-08-31 17:58
i did a quick search, i think the SDK is doing it here: https://github.com/hyperledger/fabric/blob/master/sdk/node/src/hfc.ts#L1616

ghaskins
2016-08-31 17:58
hope that helps

ghaskins
2016-08-31 17:59
lines 1662 and 1664 are the most obvious demonstration

novusopt
2016-09-01 08:26
Hi, can someone explain, why the access to the transaction id within a chaincode has been removed...

bgorman
2016-09-01 08:30
@novusopt it may have been an unintentional side effect of adding the ChaincodeStubInterface

bgorman
2016-09-01 08:30
how did you access the transaction ID previously?


bgorman
2016-09-01 08:31
right, there probably just needs to be a function added to the interface

hgabor
2016-09-01 08:31
shall I add it?

bgorman
2016-09-01 08:31
you could open a JIRA issue, I could take a look at it tomorrow (or hgabor could do it now)

bgorman
2016-09-01 08:31
:slightly_smiling_face:

novusopt
2016-09-01 08:31
sure

hgabor
2016-09-01 08:31
I can do it now

novusopt
2016-09-01 08:32
@hgabor that would be really cool

novusopt
2016-09-01 08:40
shal i open now a jira issue?

novusopt
2016-09-01 08:40
*shall

hgabor
2016-09-01 08:56
no need for that


novusopt
2016-09-01 09:00
@hgabor thanks a lot :slightly_smiling_face:

hgabor
2016-09-01 09:00
sure :slightly_smiling_face:

hgabor
2016-09-01 09:00
I need reviewers for that change

novusopt
2016-09-01 09:00
yes, let's wait :slightly_smiling_face:

bfuentes
2016-09-01 09:11
hey guyz ! I took last update now and I got this :

bfuentes
2016-09-01 09:11
11:10:58-[benjamins-mbp:/usr/local/go/src/github.com/hyperledger/fabric] benjaminfuentes$ make build/bin/membersrvc CGO_CFLAGS=" " CGO_LDFLAGS="-lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy" GOBIN=/usr/local/go/src/github.com/hyperledger/fabric/build/bin go install -ldflags "-X http://github.com/hyperledger/fabric/metadata.Version=0.6.0-SNAPSHOT-0289230" http://github.com/hyperledger/fabric/membersrvc # http://github.com/hyperledger/fabric/vendor/github.com/tecbot/gorocksdb vendor/github.com/tecbot/gorocksdb/backup.go:4:11: fatal error: 'rocksdb/c.h' file not found #include "rocksdb/c.h" ^ 1 error generated. # http://github.com/hyperledger/fabric/vendor/github.com/mattn/go-sqlite3 ld: library not found for -lrocksdb clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [build/bin/membersrvc] Error 2

bfuentes
2016-09-01 09:11
any idea ?

hgabor
2016-09-01 09:12
in vagrant?

bfuentes
2016-09-01 09:15
yes

bfuentes
2016-09-01 09:15
did i do something wrong ?

bfuentes
2016-09-01 09:15
i will try to do again a vagrant up

bfuentes
2016-09-01 09:29
I think something get wrong

bfuentes
2016-09-01 09:29
==> default: Tag latest not found in repository http://docker.io/hyperledger/fabric-baseimage ==> default: make: *** [build/image/src/.dummy] Error 1 The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong.

bfuentes
2016-09-01 09:29
and of vagrant up

bfuentes
2016-09-01 09:45
well , now got this :

bfuentes
2016-09-01 09:45
11:44:15-[benjamins-mbp:/usr/local/go/src/github.com/hyperledger/fabric] benjaminfuentes$ make Building docker src-image docker build -t hyperledger/fabric-src build/image/src ERRO[0000] Can't add file /usr/local/go/src/github.com/hyperledger/fabric/build/image/src/gopath.tar.bz2 to tar: io: read/write on closed pipe ERRO[0000] Can't close tar writer: io: read/write on closed pipe Cannot connect to the Docker daemon. Is the docker daemon running on this host? make: *** [build/image/src/.dummy] Error 1

hgabor
2016-09-01 10:13
hmm

hgabor
2016-09-01 10:13
maybe the vagrant up process (scripts are executed at that point) was erroneous

bfuentes
2016-09-01 10:17
yes it was i suppose too

bfuentes
2016-09-01 11:12
still not working after 3 attempts

bfuentes
2016-09-01 11:21
==> default: Step 1 : FROM hyperledger/fabric-baseimage:latest ==> default: Pulling repository http://docker.io/hyperledger/fabric-baseimage ==> default: Tag latest not found in repository http://docker.io/hyperledger/fabric-baseimage ==> default: make: ==> default: *** [build/image/src/.dummy] Error 1 The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong.

bfuentes
2016-09-01 11:21
:disappointed:

bfuentes
2016-09-01 11:23
is this causing the error ?

bfuentes
2016-09-01 11:23
default: VirtualBox Version: 5.0 ==> default: Mounting shared folders... default: /vagrant => /usr/local/go/src/github.com/hyperledger/fabric/devenv default: /local-dev => /usr/local/go/src/github.com/hyperledger/fabric default: /hyperledger => /usr/local/go/src/github.com/hyperledger/fabric default: /chaincodeRepo => /Users/benjaminfuentes/git default: /opt/gopath/src/github.com/hyperledger/fabric => /usr/local/go/src/github.com/hyperledger/fabric ==> default: Running provisioner: shell... default: Running: inline script ==> default: stdin: is not a tty ==> default: ++ export DOCKER_STORAGE_BACKEND= ==> default: ++ DOCKER_STORAGE_BACKEND= ==> default: ++ cd /hyperledger/devenv ==> default: ++ ./setup.sh ==> default: ./setup.sh: line 40: ---;;---: command not found ==> default: ./setup.sh: command substitution: line 40: syntax error near unexpected token `||' ==> default: ./setup.sh: command substitution: line 40: ` || '

hgabor
2016-09-01 11:28
did you do vagrant destroy, vagrant up?

hgabor
2016-09-01 11:29
@bfuentes

bfuentes
2016-09-01 11:29
i deleted vagrant vm on virtualbox

bfuentes
2016-09-01 11:29
does this do a different thing ?

bfuentes
2016-09-01 11:30
trying your solution nao

bfuentes
2016-09-01 11:37
same issue

bfuentes
2016-09-01 11:37
some logs

bfuentes
2016-09-01 11:37
:disappointed:

bfuentes
2016-09-01 11:37
i am going to delete all files and then try again

hgabor
2016-09-01 12:25
from virtualbox "delete all files and vm" or something?

cbf
2016-09-01 12:28
vagrant halt; vagrant destroy; vagrant up

bfuentes
2016-09-01 12:44
@cbf Thanks, "vagrant destroy" works better than destrying the VM in VirtualBox

bfuentes
2016-09-01 12:44
:smile:

bfuentes
2016-09-01 12:45
peer up again

cbf
2016-09-01 13:03
yay

bfuentes
2016-09-01 14:01
:the_horns:

shireesh18
2016-09-01 15:38
has joined #fabric

shireesh18
2016-09-01 15:40
what is the clone command that you are using? I encountered this issue till yesterday working fine today after change in the clone cmd

yannik
2016-09-01 16:34
@jzhang getting the same error. Have you solved it?

jzhang
2016-09-01 16:41
@yannik no I haven’t gotten back to it yet since yesterday. asked around the local team today, no one seems to know what it’s about...

jzhang
2016-09-01 17:06
my colleague was able to reproduce it though

david.acton
2016-09-01 17:17
Hey gang. Is it possible to register a user that’s not defined in the membersrvc.yaml file? I’ve tried a new user but I get “sql: no rows in result set"

david.acton
2016-09-01 17:18
Before I start tearing apart my code, I’d thought I’d check if it was possible first

david.acton
2016-09-01 17:50
I’ve just answered my own question. .. It’s yes… the error “sql: no rows in result set” is not very helpful. :slightly_smiling_face:

jzhang
2016-09-01 18:10
@david.acton you can definitely register new users dynamically (not already in membersrvc.yaml), the error you are seeing is (almost certainly) due to corrupt user registry, I’d try blowing away the membersrvc and reboot (eg: —force-recreate if you use docker-compose)

julio
2016-09-01 21:21
@ghaskins Thanks for pointing that out.

david.acton
2016-09-01 22:47
@jzhang Thanks for your response. In this circumstance it was because I had done a refresh, but was using a registrar certificate from before I reset the membership srvc. BUT there’s no way to know this from the error message.

david.acton
2016-09-01 22:47
All is good now

ashishkel
2016-09-02 05:09
@jzhang : You mentioned that we can have users who are not present already in the membersrvc.yaml. How to do that? Is there a REST API ? or CLI ? or is it just present only in Node SDK?

ashishkel
2016-09-02 05:11
Is there a master list of the Environment variables ( the CORE_<> variables) anywhere in the docs ? or any file?

bgorman
2016-09-02 05:12
@ashishkel the CORE_* environment variables map onto the variables in peer/core.yaml

bgorman
2016-09-02 05:13
e.g. CORE_PEER_ADDRESS matches the line peer: address: 0.0.0.0:7051

ashishkel
2016-09-02 05:18
oh oh,, :slightly_smiling_face: so thats the trick. CORE_ + CAPS( of each level in the hierarchy ) ??

bgorman
2016-09-02 05:18
yep

ashishkel
2016-09-02 05:18
:slightly_smiling_face: Thts awesome

bgorman
2016-09-02 05:19
but confusing until you know the trick :slightly_smiling_face:

pushpalatha
2016-09-02 05:22
@bgorman : This is great... And is it the same case with memberservice.yaml ? How can we override the values for the properties in that file?

bgorman
2016-09-02 05:23
I haven't played much with membersrvc but it might do the same

pushpalatha
2016-09-02 05:24
okie.. Hope it's same.. Let me explore. Thank you

yannik
2016-09-02 06:59
@jzhang my feeling is that docker isn't interpolating the `$GOPATH` variable in the `hyperledger/fabric-baseimage` dockerfile. I can't overcome it yet though, so not sure.

pushpalatha
2016-09-02 07:54
@jzhang : Can you please explain how do we force-recreate in docker-compose?

suri
2016-09-02 08:36
i have created my own contract how can i deploy to real world

suri
2016-09-02 09:10
i am getting the following error

suri
2016-09-02 09:10
Error when deploying chaincode: Path to chaincode does not exist: http://github.com/chandra201/hyperledger

suri
2016-09-02 09:10
any body help me

hgabor
2016-09-02 09:15
is this a relative path?

hgabor
2016-09-02 09:15
could you show the cli command you try to deploy with?

michael.y
2016-09-02 09:19
has joined #fabric

hypertux
2016-09-02 09:50
has joined #fabric

jzhang
2016-09-02 15:58
@ashishkel the ability to dynamically add new users to memberservice’s user registry (an operation called “register user” in documentation) is available only via node.js SDK, chain.register() or chain.registerAndEnroll()

jzhang
2016-09-02 16:00
@yannik yep I’ve also gathered as much, still not sure what exactly is the cause, because I double checked that $GOPATH is set both in the docker instance for the peer and also in the host environment (mac terminal in the case of Docker for Mac)

jzhang
2016-09-02 16:00
@pushpalatha not sure I understand your question, “docker-compose up —force-recreate” is what i use when i need to reset all the peers and membersrvc

garisingh
2016-09-02 17:51
@suri - how are you deploying the chaincode?

mshap
2016-09-02 18:06
has joined #fabric

matanyahu
2016-09-03 16:16
has joined #fabric

matanyahu
2016-09-03 16:18
I am having the same issues as @bfuentes when I do vagrant up today : Tag latest not found in repository. I traced it to /fabric/images/src/Dockerfile.in but honestly I have no idea how to modify it so that it does not search for "latest" but instead, it looks for something else

matanyahu
2016-09-03 16:21
Has anyone actually managed to successfully run vagrant up since yesterday?

bfuentes
2016-09-03 17:19
"vagrant destroy" @matanyahu

matanyahu
2016-09-03 18:16
@bfuentes : tried it, did not work out for me. I now did snapshot rollback on a host where I execute vagrant up and I did a fresh new git pull. Will try again.

cbf
2016-09-03 18:45
@ghaskins ^^

ghaskins
2016-09-03 18:55
Yeah, discussing in #fabric-dev-env

ghaskins
2016-09-03 18:55
I think there is a leftover build in the tree

codascud
2016-09-04 19:17
Is bluemix still down? "Sorry, but due to overwhelming demand, we are currently at maximum capacity for our service."

garisingh
2016-09-04 20:35
@codascud - existing service instances are still running but you can't create any new ones right now. we thought we added enough to get through the weekend but apparently that was not the case. working on it

codascud
2016-09-04 22:12
Thanks @garisingh

garisingh
2016-09-04 22:14
no problem. we continue to learn more and more about the "limits" of how many containers you can actually get running on machine especially when using Docker's overlay networking. we hit some undocumented limits so we'll be adding more servers into the mix and should get more capacity out by tomorrow

rvaughan
2016-09-05 10:53
has joined #fabric

rajeshsubhankar
2016-09-05 12:52
has joined #fabric

oiakovlev
2016-09-05 12:58
has joined #fabric

oiakovlev
2016-09-05 13:06
Hi. What are recommended sys requirements for running fabric peer node? membership service? I realize that it depends on the whole network setup, probably chaincode we are going to run etc.. but some starting point? or on what env IBM did their tests?

duncanjw
2016-09-05 13:09
We’d appreciate any feedback on the work we’ve been doing developing Apache Brooklyn blueprints to deploy and manage Fabric. This has been written up here - https://developer.ibm.com/blockchain/2016/08/03/running-hyperledger-fabric-on-ibm-blue-box-with-cloudsoft-amp/

sarahmills
2016-09-05 13:10
has joined #fabric

duncanjw
2016-09-05 13:11
While we’ve focused on targeting IBM Blue Box taking advantage of underlying private network that connects clusters around the world there is nothing to stop you using other clouds/infra

duncanjw
2016-09-05 13:12
The author of this post @mikezaccardo is best person to talk to as he has led this work and demoed it at DockerCon and most recently CNCF sponsored Software Circus event

viking1
2016-09-05 13:15
has joined #fabric

vriffier
2016-09-05 13:56
has joined #fabric

rajeshsubhankar
2016-09-05 17:21
Can I start my peers using docker-compose inside vagrant env ? While I am doing so, it is actually pulling fabric-peer from http://docker.io/hyperledger/fabric-peer . It should use my local version of fabric-peer.

oiakovlev
2016-09-05 17:31
if you make it before, it will use

oiakovlev
2016-09-05 17:32
`docker images` - lists your images, if related image is not present, it will try to pull it

miro
2016-09-05 18:30
has joined #fabric

cbf
2016-09-05 18:54
I created #fabric-maintainers which is open to anyone, but intended for discussion and coordination amongst the fabric-related project maintainers

chainsaw
2016-09-05 21:57
@garisingh can you share those "undocumented" limits with us?

garisingh
2016-09-05 22:29
@chainsaw - sure. It is really when you start to combine things like Linux, bridge interfaces, overlay networks, Docker and Swarm that things get interesting. Here's a few examples: 1) The Linux kernel has a hard-coded limit of 1024 virtual interfaces per bridge interface. This is of course sort-of known if you know Linux networking and you can work around it by creating multiple bridge interfaces. But - now let's say you want to use Docker's built-in overlay network driver AND the containers needs to connect to external networks. This results in a bridge network network being created automatically and overlay networks can only use this bridge network. End result: as far as we can tell, using the Docker overlay driver results in a limit of 1023 containers per host 2) Docker Swarm calls RefreshNetwork as part of every CreateContainer call. The larger the number of containers on the overlay network, the more expensive this call becomes and the longer it takes to start each container. (FYI - looks like there is a fix for this in the current master branch for Swarm and we'll take a look at that) 3) There are a number of other setting which we have learned about via trial and error as well: - parameters like `net.ipv4.neigh.default.gc_thresh1`, `net.ipv4.neigh.default.gc_thresh2`,`net.ipv4.neigh.default.gc_thresh3` need to be set much higher than the defaults in order to avoid arp table overruns - parameters like `vm.dirty_ratio` and `vm.dirty_background_ratio` need to be properly set to lower values when you have a lot of containers which write to disk else Ubuntu will hang due to task timeouts The reality is that there really is no documentation / documented best practices of trying to run things like Swarm at massive scale when you need things like overlay networks, have stageful containers, etc.

garisingh
2016-09-05 22:35
And just in case you don't know what we do / try to do, one part of my job is to own the Bluemix Blockchain Service where we run 4 peer + CA PBFT networks for our customers. We run this in a shared environment using Docker Swarm for the peers and CAs and another Docker Swarm to run the chaincode. So we try to run as many containers per host as we can (well that was the hope). Right now we have about 6500 containers running peers and CAs across 8 host systems

garisingh
2016-09-05 22:38
on the prior version of our service, we didn't use overlay networks (but that caused us other issues) and we had about 15000 containers running peer and CAs across 32 VMs

chainsaw
2016-09-05 23:13
Cool dude! I get it all and then some :slightly_smiling_face: Thx for sharing this. For the last several months I've been using Bluemix IBM Blockchain (your baby) for my technical education sessions teaching engineers how to develop chaincode, build Hyperledger Fabric, and soon how to architect for real-world blockchain/chaincode applications. This helps confirm some of my suspicions. Personally, I advise clients against swarm unless they have use cases that suit it, otherwise, I have found other proprietary ways to get around the scaling, discovery, and inter/intra-container communication issues. Did you read the PR from Verizon stating they successfully cranked an IoT infrastructure running 40,000 docker containers? It was to be their platform for competing in the IoT space.

chainsaw
2016-09-05 23:16
@garisingh why are you on v0.4.1 and not 0.5.0? When will you upgrade, 0.6?

garisingh
2016-09-05 23:34
funny thing - we had our own versioning system for the BMX service - but it is actually running v0.5-developer-preview

garisingh
2016-09-05 23:34
(it is hidden somewhere in the release notes for the service)

garisingh
2016-09-05 23:35
we'll wait for the official release of 0.6 to be cut before we put it out in the service. we also need to figure out how to best deal with incompatible versions / documentation. But we'll figure it out

chainsaw
2016-09-05 23:41
Ah...I missed that one. Now I can clone 0.5 and use it as a reference for what is deployed in BMX, while I continue eating the bleeding-edge? Or do you take the open source version and add code specific and proprietary to IBM?

hanhzf
2016-09-06 05:12
has joined #fabric

pascalli
2016-09-06 05:43
Hi, since I installed the latest version of fabric, I can find transactionresults in nonhasdata is it normal ? how can I test the result of transaction ? t hanks

hgabor
2016-09-06 07:06
hi @pascalli

hgabor
2016-09-06 07:10
successful TXs are put into blocks so one should check block events. unsuccessful ones : there are so-called rejection events for them that are sent out to subscribers

hgabor
2016-09-06 07:10
e.g. 1, you subscribe for block and rejection events 2, do something / invoke, anything 3, you get the event

hgabor
2016-09-06 07:11
see examples/events/block-listener/ for a sample

pascalli
2016-09-06 07:12
ok, it's a new functionality ? and now we haven't transactionresults ?

hgabor
2016-09-06 07:17
it works that way for months :slightly_smiling_face:

hgabor
2016-09-06 07:17
the motivation to make it that way was that it is generally bad to store failed transactions (e.g. one can easily flood the ledger)

hgabor
2016-09-06 07:19
have a look at the example and ask me if something is unclear :slightly_smiling_face:

pascalli
2016-09-06 07:20
ok thanks,

ashnur
2016-09-06 08:00
can someone tell me please in what state the 0.6 branch is in? which one should I use, v0.5 or 0.6?

pushpalatha
2016-09-06 09:32
Anyone know where the logs go when we log something in our code using op/logging ? In earlier versions we used to see that on register chain code console...

bryan-huang
2016-09-06 10:46
has joined #fabric

cbf
2016-09-06 13:03
@ashnur: v0.6 still being hardened, usable but may change... depends on what you are trying to do

ashnur
2016-09-06 13:04
@cbf thanks! nothing special in particular. I just had a week where I couldn't keep up with fabric, and I saw 0.6 :slightly_smiling_face:.

cbf
2016-09-06 13:06
we'd love feedback on 0.6 if you are game - probably a couple more weeks of bug squashing

cbf
2016-09-06 13:06
apis different - rest, sdk and chaincode between 0.5 and 0.6

lbonniot
2016-09-06 13:15
@cbf Hi, I'm using v0.6 and it seems to be pretty stable. However, we can see that there is a lot of "work in progress" in there. IMHO, the v0.6 release should at least include these patches to be considered "polished" for chaincode development, without too much upgrade issues (I ran into issues translating v0.5 to v0.6 chaincode because those were missing) https://gerrit.hyperledger.org/r/#/c/729/ Use stub to get arguments in chaincodes https://gerrit.hyperledger.org/r/#/c/841/ Add GetTxID function to Stub interface (FAB-306) By the way, is this document still valid (especially regarding versions)? http://lists.hyperledger.org/pipermail/hyperledger-fabric/attachments/20160803/26504609/attachment-0001.pdf#13 Thanks!

pascalli
2016-09-06 14:01
@hanhzf is it possible to code a block listener in Python, because I use un python script to communicate with my deploied chaincode ?

hgabor
2016-09-06 14:01
@pascalli why not? :slightly_smiling_face: it only needs protobuf

pascalli
2016-09-06 14:06
@hanhzf I must translate in python all protos package ?

hgabor
2016-09-06 14:10
however I am not hanzhf, but I think that the needed proto files can be used and protobuf can generate python code from them


pascalli
2016-09-06 14:11
thanks for the link :slightly_smiling_face:

hgabor
2016-09-06 14:12
sure :slightly_smiling_face:

rajeshsubhankar
2016-09-06 15:45
What is the difference between fabric-peer and fabric-baseimage ? in my docker toolbox env I am seeing both hyperledger/fabric-peer and hyperledger/fabric-membesrvc images but in my vagrant env I am seeing only hyperledger/fabric-baseimage .

joseph
2016-09-06 16:21
Hi All,

joseph
2016-09-06 16:22
The file membersrvc.yml contains a lot of sensitive information. How do we protect this file?

balakrishna
2016-09-06 17:52
Hi all, How can i create new user ECert/TCerts for new user ..?

balakrishna
2016-09-06 17:52
do any one have examples for creating certificates ..?

jce23
2016-09-06 18:55
has joined #fabric

szlaci83
2016-09-06 21:48
Hi @joseph i think membersrvc.yml is just for testing purposes....

suri
2016-09-07 07:22
any body help me how to deploy the chaincode without arguments i tried but i am facing the issue

suri
2016-09-07 07:23
syntax error: unexpected var at end of statement\n

bgorman
2016-09-07 07:27
what method are you using to deploy? REST, CLI, SDK?

suri
2016-09-07 07:27
rest api

bgorman
2016-09-07 07:28
does your ctorMsg string look like this? {"Function":"init", "Args": []}

suri
2016-09-07 07:30
same only

suri
2016-09-07 07:31
{ "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID":{ "path": githubURL }, "ctorMsg": {"Function":"init", "Args": []} }, "id": 19 },

bgorman
2016-09-07 07:32
looks okay to me... and the error comes back in the response when you send that?

bgorman
2016-09-07 07:33
is that comma on the end meant to be there?

suri
2016-09-07 07:34
Error getting chaincode package bytes: Error getting code \'go get\' failed with error: "exit status 2"\n#syntax error: unexpected semicolon or syntax error: unexpected var at end of statement

suri
2016-09-07 07:34
if we pass aruguments is working

suri
2016-09-07 07:35
without arguments i am trying to deploy its not working

stylix
2016-09-07 07:40

stylix
2016-09-07 07:40
try this with curl

stylix
2016-09-07 07:41
also pls try "args": [""] instead of "args": []

bgorman
2016-09-07 07:43
@suri could that be an error from your chaincode? it seems like a golang compile error to me (which is weird if the args fix it)

bgorman
2016-09-07 07:43
C:\Users\brad>go run test.go .\test.go:8: syntax error: unexpected var at end of statement

suri
2016-09-07 07:45
k

suri
2016-09-07 07:45
its compiled properly

suri
2016-09-07 07:46
but i didn't run it

suri
2016-09-07 07:46
thank you

pascalli
2016-09-07 08:58
Hi, with the latest version of fabric, I try to delete a table, it's OK according the response, but after a new creation, this table is not empty, is somebody has a response ? thanks

ant2221
2016-09-07 14:48
@cbf is there somewhere with all those API changes? so we can see what may break our current apps if we update

cbf
2016-09-07 14:52
you mean are they enumerated? we don’t have that yet

oiakovlev
2016-09-07 15:03
Hi! Is there any description of how transaction block is created? I mean - timeouts, size etc, which peer is responsible of the order of transactions and so on? even, if there is no doc for this, can smbdy point me to the class in the fabric core which is responsible for this? Thnks.

tuand
2016-09-07 15:12
start with the hyperledger/fabric/docs/protocol-spec.md document ... note that no one peer controls the transaction ordering, this is done by all the peers through the pbft consensus protocol

lgrace896
2016-09-07 15:24
has joined #fabric

jake.turner
2016-09-07 15:27
@cbf Hi, whereabouts can I find v0.6? I'm assuming v0.6 will replace the version Bluemix is running at some point? Whenabouts might that be?

anastasia.paterson
2016-09-07 15:34
has joined #fabric

ant2221
2016-09-07 15:38
@cbf thanks, I am seeing increasing number of requests for this to be listed/available on client/internal events

cbf
2016-09-07 15:38
@jake.turner it isn’t officially released, but right now, you can clone gerrit and then check out the v0.6 branch

cbf
2016-09-07 15:38
yes, I am working on getting a bit more structure around releases

cbf
2016-09-07 15:38
and a regular cadence of stable releases

cbf
2016-09-07 15:38
with release notes etc

tdietter
2016-09-07 17:38
FAB-286

oiakovlev
2016-09-07 18:17
@tuand - I have read protocol specification, especially http://hyperledger-fabric.readthedocs.io/en/latest/protocol-spec/#3211-block I don't see here any settings for timeouts or block size. So what are the rules for peer to put few transactions in the block, i.e. when to generate a block? This is first. The second one - I don't think that consensus protocol take part in building block itself, or am I mistaken? My understanding was that with current impl, there is a leading peer, which build the block and propagating it to the ledger (other peers) - which is still unclear. Actually transaction ordering really matters while executing transactions.

tuand
2016-09-07 18:31
transactions are batched before being processed. This is configured via the hyperledger/fabric/consensus/pbft/config.yaml file. 2 parameters : batchsize ( how many transactions in a batch ) and timeout_batch ( send a batch through even if batchsize is not reached ). pbft has the concept of a primary which assigns a sequence number and starts consensus by sending what's called a pre-prepare msg to the other peers.

tuand
2016-09-07 18:34
there's no leader election. The peers are named vp0,vp1,vp2 ... vpN . You start with vp0 as the primary. At any time, the other peers can decide that a new primary is needed ( a view-change in pbft speak ) and the primary switches to the next peer in sequence

tuand
2016-09-07 18:34
pbft is better described in the Castro and Liskov paper referenced in the protocol-spec doc

tuand
2016-09-07 18:35
also, this is if you're using pbft. If you're using noops, each transaction is processed individually

tuand
2016-09-07 18:37
and the consensus folks tend to use #fabric-consensus-dev so come on over :slightly_smiling_face:

oiakovlev
2016-09-07 18:38
that's really makes more sense, thanks

oiakovlev
2016-09-07 18:40
and just to double check: transactions are processed by peer one by one in the block, so let's say there can be no race condition right now?

tuand
2016-09-07 18:40
right

oiakovlev
2016-09-07 18:42
so as long as we have block, we have deterministic order - that's why we are on safe side working with the hashed values...

tuand
2016-09-07 18:42
note though that 2 or more clients can send transactions simultaneously ... in that case, order is arbitrary

oiakovlev
2016-09-07 18:43
yes, I got it, but see my comment above: as long as peer built the block and propagated it to other peers it is deterministic

oiakovlev
2016-09-07 18:44
so it is a bit incorrect to say but it is like all invocations are synced using some common mutex object?

tuand
2016-09-07 18:45
no propagation ... all peers consent on the ordering then each peer executes all transactions in the sequence agreed upon

oiakovlev
2016-09-07 18:46
ok it is about terminology - `consent on the ordering` as you mentioned above there is still some primary peer... anyway details here might not matter it is necessary to understand the idea... Thanks...

tuand
2016-09-07 18:50
ok ... I do recommend the Castro and Liskov paper as what we have in fabric is a pretty close implementation of that paper. Also see Christian Cachin's paper "Yet another visit to Paxos"

oiakovlev
2016-09-07 18:51
Thanks again. I'll have a look at it - I have read protocol spec but guess that still have some gaps in understanding. Also one more silly question: Is my understanding correct here that the max time to execute the block will be: `batchsize*timeout` (transaction timeout) or also some PBFT specific timeouts can take a role here? I mean if I write 'bad' chaincode which executes really long it will impact the throughput or not?

tuand
2016-09-07 18:54
no, execution is on another thread. take a look at hyperledger/fabric/pbft/config.yaml for the timeouts you can tweak

tuand
2016-09-07 18:56
fabric does assume that a chaincode is deterministic and does not validate that the peers have the same result. More than a few folks have been bitten by this. Take a look in github-archives for issue #1981

oiakovlev
2016-09-07 18:59
Thanks, I'll have a look, it was really helpful to get these answers. Could I use your kindness again some time after reviewing all this and ping you here, if have any further question?


tuand
2016-09-07 19:00
ask over on #fabric-consensus-dev , any of us can answer

tuand
2016-09-07 19:02
and @oiakovlev before I forget ... we're also proposing a new architecture for fabric https://github.com/hyperledger-archives/fabric/wiki/Next-Consensus-Architecture-Proposal

oiakovlev
2016-09-07 19:03
thanks again

oiakovlev
2016-09-07 21:54
Is there any option to get historical 'versioned' values from KVS?

bala.vellanki
2016-09-07 21:57
has joined #fabric

xiejunan
2016-09-08 02:00
has joined #fabric

ccooper21
2016-09-08 03:18
Hi! I'm trying to run the Hello World chaincode example and am running into problems. Is this the right place to get help?

bgorman
2016-09-08 03:25
@ccooper21 it's a good place to start :slightly_smiling_face:

ashishkel
2016-09-08 05:34
@bgorman :slightly_smiling_face:

bgorman
2016-09-08 05:34
hi @ashishkel

ashishkel
2016-09-08 05:35
Hi Brad. had one question.. More from a docker perspective..

ashishkel
2016-09-08 05:36
assuming that i m preparing the docker images,

ashishkel
2016-09-08 05:37
then importing them to another one - which contains my smart contracts also -- I tweaked make files a bit to include them also.... - so i m getting a customized docker image

ashishkel
2016-09-08 05:37
and booting up another machine.. with docker installed

ashishkel
2016-09-08 05:37
exporting the image which i imported into that ..

ashishkel
2016-09-08 05:38
and bringing the docker up..

ashishkel
2016-09-08 05:38
-- This should give me another HL Fabric instance rite?

bgorman
2016-09-08 05:38
if it's in the image you're running, yes

ashishkel
2016-09-08 05:40
my peer image is as much in size as the original peer-image.. fraction more.. and membership image is very same and i tried logging into the docker shell - it all seems to be there.. let me see running it

vzhou
2016-09-08 15:11
has joined #fabric

mhagelstrom
2016-09-08 17:59
has joined #fabric

oiakovlev
2016-09-08 20:00
Have asked it yesterday will try once more :slightly_smiling_face: : Is there any option to get historical 'versioned' values from KVS? So for example is there any easy way to retrieve all values, which some key had? Or do I get versioning terminology a bit wrong and it doesn't support this?

dave.enyeart
2016-09-08 20:35
It is not possible to get the past values from KVS, this is being looked at for a next major release.

oiakovlev
2016-09-08 20:44
thanks a lot! means v0.6, right?

oiakovlev
2016-09-08 20:44
or 0.6 is a minor one?

dave.enyeart
2016-09-08 20:47
the major design changes around endorsement model and new ledger are targeted for v1, but may get previewed in one of the minor releases leading up to v1

oiakovlev
2016-09-08 20:49
thanks, got it, by the way any road map with the dates exist? - I saw one but not sure accurate it can be

venkat
2016-09-08 21:00
just wondering: Does the consensus happen at block level or at txn level? If it is at transaction level, what happens if some txns in a blcock fail to get consensus? (posted in general, but thought more relevant here)

venkat
2016-09-08 22:13
one more q: can we use an SQL store for the chain state and use SQL statements to quey data? The statehash could be a problem, may be?

tuand
2016-09-09 00:01
@venkat it depends on the pbft batch size . If batchsize=1 then consensus is done on each incoming transaction, if batchsize=x where x>1 then consensus is done on the batch of x transactions

tuand
2016-09-09 00:02
I'll ask @dave.enyeart or @manish-sethi to chime in on the data store question

oiakovlev
2016-09-09 00:04
but just to double check: when consensus is done on the batch, if there is transaction(s) which is(are) not accepted by consensus, what happens? They are simply excluded from batch or the whole batch is rejected?

tuand
2016-09-09 00:33
The whole batch is treated as one

manish-sethi
2016-09-09 04:30
@venkat in 0.6 branch which is based on current architecture, it is easy to use an SQL store for using a richer data model from chaincode perspective - So a chaincode could maintain it’s state in relational form. However, you pointed out the exact point of difficulty which is computing the statehash. Also, other related difficulty would be to maintain the stateDeltas which are used during state transfer if a peer is a few blocks behind.

shiseki
2016-09-09 05:02
has joined #fabric

venkat
2016-09-09 05:15
thanks @manish-sethi, @tuand

venkat
2016-09-09 05:29
Do we have something similar to oracles for interacting with external services?

jonathanlevi
2016-09-09 06:38
@venkat: nope, not at this point. You can build it though...

jonathanlevi
2016-09-09 06:39
(having to manage "your" set of TTPs, keys, etc.)

jonathanlevi
2016-09-09 06:39
Not impossible (at a given level of ‘scale’), I would say.

deeflorian
2016-09-09 10:19
@oiakovlev check http://goo.gl/CG9Qwi -- it has an attachment which has a basic timeline (dont know how the guys are keeping up with the schedule so far) also, regarding the consensus reject: batches are treated as one and rejected as one, but single transactions can still fail on the chaincode (from reasons like system errors, timeouts, to ledger state related execution rejection - "wont do that transaction, you dont have enough funds on your account")

deeflorian
2016-09-09 10:21
ledger state should match on peers, so rejects like the latter should happen on all peers, resulting in a consistently not changed state on every peer (not sure on the fault-tolerancy though, what happens if a single peer has a bit-error of some sorts? used to be an issue, but i'll need to look into the current code to check)

oiakovlev
2016-09-09 10:41
Thanks

karn
2016-09-09 15:32
has joined #fabric

mart0nix
2016-09-09 16:32
has joined #fabric

sukrith
2016-09-09 16:32
has joined #fabric

roderik
2016-09-09 18:25
has joined #fabric

tomrsmith
2016-09-09 19:24
has joined #fabric

gpartha
2016-09-09 21:40
has joined #fabric

suri
2016-09-10 07:29
any body help me how to register a new user

adeelqureshi
2016-09-10 09:19
has joined #fabric

adeelqureshi
2016-09-10 14:29
Hi fellows, wondering if some one can help with following I've cloned the "learn chain code" repo (https://github.com/IBM-Blockchain/learn-chaincode.git)and trying to build the very first program with Go when I run " go build ./ " it spits out following error \chaincode_start.go:34: cannot use new(SimpleChaincode) (type *SimpleChaincode) as type shim.Chaincode in argument to shim.Start: have Init(*shim.ChaincodeStub, string, []string) ([]byte, error) want Init(shim.ChaincodeStubInterface, string, []string) ([]byte, error) Any ideas ?

adeelqureshi
2016-09-10 14:33
I have go 1.7 installed

rajeshsubhankar
2016-09-10 14:34
@adeelqureshi replace *shim.ChaincodeStub with shim.ChaincodeStubInterface in all your functions and then build it.

adeelqureshi
2016-09-10 14:34
Thanks let me try

adeelqureshi
2016-09-10 14:39
@rajeshsubhankar : That worked ... Thanks !

chainsaw
2016-09-10 16:35
Here is some good info on the maximum number of Dockers you can run in a Host, in addition to excellent undocumented information provided by @garisingh on Sept 5th.

chainsaw
2016-09-10 16:35
The figures below are from the boot2docker 1.11.1 vm image which is based on Tiny Core Linux 7. The kernel is 4.4.8 Docker Docker creates or uses a number of resources to run a container, on top of what you run inside the container. Attaches a virtual ethernet adaptor to the docker0 bridge (1023 max per bridge) Mounts an AUFS and shm file system (1048576 mounts max per fs type) Create's an AUFS layer on top of the image (127 layers max) Forks 1 extra docker-containerd-shim management process (~3MB per container on avg and sysctl kernel.pid_max) Docker API/daemon internal data to manage container. (~400k per container) Creates kernel cgroups and name spaces Opens file descriptors (~15 + 1 per running container at startup. ulimit -n and sysctl fs.file-max ) Docker options Port mapping -p will run a extra process per port number on the host (~4.5MB per port on avg and sysctl kernel.pid_max) --net=none and --net=host would remove the networking overheads. Container services The overall limits will normally be decided by what you run inside the containers rather than dockers overhead (unless you are doing something esoteric, like testing how many containers you can run :slightly_smiling_face: If you are running apps in a virtual machine (node,ruby,python,java) memory usage is likely to become your main issue. IO across a 1000 processes would cause a lot of contention. 1000 processes trying to run at the same time would cause a lot of context switching (see vm apps above for garbage collection) If you create network connections from a 1000 containers the hosts network layer will get a workout. It's not much different to tuning a linux host to run a 1000 processes, just some additional Docker overheads to include. Example 1023 busybox images running nc -l -p 80 -e echo host uses up about 1GB of kernel memory and 3.5GB of system memory. 1023 nc -l -p 80 -e echo host processes uses about 75MB of kernel memory and 125MB of system memory Starting 1023 containers serially took ~8 minutes. Killing 1023 containers serially took ~6 minutes

matanyahu
2016-09-10 17:33
@chainsaw: did you try spinning up Fabric peers by using Docker engine on top of Tiny Core?

chainsaw
2016-09-10 22:31
@matanyahu: No, why do you ask? Is there a known or anticipated technical issue?

vikas.singh
2016-09-11 05:57
has joined #fabric

matanyahu
2016-09-11 06:28
@chainsaw : No, I was just curious. I've been playing around with Tinycore for different purposes and I find it a really compact purpose-OS. However, I never considered using it as Docker engine.

mart0nix
2016-09-11 09:01

mart0nix
2016-09-11 09:02
I'm able to start the peer and the CA

mart0nix
2016-09-11 09:02
but when I attempt to run chaincode_example02 - I'm getting the following error

mart0nix
2016-09-11 09:02
2016/09/11 12:00:47 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 0.0.0.0:7051: getsockopt: connection refused"; Reconnecting to {"0.0.0.0:7051" <nil>}

mart0nix
2016-09-11 09:03
I'm running this on my Mac

szlaci83
2016-09-11 09:29
Hi guys, i am using v0.5 and trying to use the auditor. I have added an auditor user to membersrvc.yaml in order to login the auditor, but now i need to have tcerts as well, how can I add them?

zhuang.wei.ming
2016-09-11 16:44
auditor is not finished function in v0.5. But I do not know v0.6, where can I check what happened in v0.6?

zhuang.wei.ming
2016-09-11 16:45
@szlaci83 hope can help you

szlaci83
2016-09-11 19:27
thanks @zhuang.wei.ming

suri
2016-09-12 06:56
when i am registeering new user i am getting the error grpc: ClientConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp [::1]:7054: getsockopt: connection refused"; Reconnecting to "localhost:7054"

suri
2016-09-12 06:57
anybody can suggest me how can i resolve this issue

bgorman
2016-09-12 07:09
@suri does netstat show your membersrvc listening on localhost:7054?

bgorman
2016-09-12 07:10
and is your membersrvc running on the same host/container as where ever you are running that?

suri
2016-09-12 08:44
than q now the membership services is running

suri
2016-09-12 08:44
now i am getting Identity lookup error: sql: no rows in result set

szlaci83
2016-09-12 09:07
@suri how did you register the user? did you use the yaml file or ca?

suri
2016-09-12 09:21
ca

garisingh
2016-09-12 10:11
@suri - how are you running things? In Docker containers or as processes on the OS?

balakrishna
2016-09-12 14:19
Hello Good morning, Anyone tried to execute " asset_management_with_roles" sample with NodeSDK

balakrishna
2016-09-12 14:20
i facing a issue while trying to retrieve roles associated for particular user.

grapebaba
2016-09-12 14:21
yes

grapebaba
2016-09-12 14:21
just fixing

balakrishna
2016-09-12 14:25
@muralisr @garisingh Hello Good morning, Anyone tried to execute " asset_management_with_roles" sample with NodeSDK. i facing a issue while trying to retrieve roles associated for particular user.

ganesh47
2016-09-12 15:05
has joined #fabric

joseph
2016-09-13 04:23
Hi All,

joseph
2016-09-13 04:25
In the specification, it mentions that the world state of a peer is computed by a crypto hash function.

joseph
2016-09-13 04:27
My question is how a chaincode can read data from data from the world state?

bgorman
2016-09-13 04:48
@joseph each peer maintains a local copy the state, from which a hash is calculated to verify the state is equal on all peers

bgorman
2016-09-13 04:49
chaincode can request a copy of any part of the state from the hosting peer

joseph
2016-09-13 04:52
@bgorman: Thank you for you reply. But I wonder how can a chaincode read an one-way encrypted data from the world state?

bgorman
2016-09-13 04:52
the hashes are not the world state

bgorman
2016-09-13 04:52
each peer has a complete copy of the world state

bgorman
2016-09-13 04:52
the hash is merely used to verify that each peer has the same world state

bgorman
2016-09-13 04:52
the chaincode can access the peer's full copy of the world state

bgorman
2016-09-13 04:53
e.g. if each peer's state hashes to the same value, everything is good.... if one peer has a different hash, it needs to re-do its calculations (I'm guessing here)

bgorman
2016-09-13 04:54
if you can reverse a one-way cryptographic hash, please DM me :smile:

joseph
2016-09-13 04:55
When we PutState(), where are data stored?

bgorman
2016-09-13 04:55
on the peer, in a RocksDB instance

joseph
2016-09-13 04:56
Can we see the data in that instance if we access to the peer?

bgorman
2016-09-13 04:57
chaincode definitely can

bgorman
2016-09-13 04:57
I guess RocksDB has a general API that you could use too

bgorman
2016-09-13 04:58
I'm not sure how advisable is... defintely don't change the data :slightly_smiling_face:

joseph
2016-09-13 04:58
I wonder so can hack into a peer and change data directly on RocksDB instance.

joseph
2016-09-13 05:00
Is that possible?

bgorman
2016-09-13 05:01
um... I guess it could be

bgorman
2016-09-13 05:02
it would mean that peer wouldn't reach consensus and the others would carry on

joseph
2016-09-13 05:17
I see. And there is no relation between world state and RocksDB instance.Right?

bgorman
2016-09-13 05:37
the RocksDB holds the world state, so there is a relationship there :slightly_smiling_face:

joseph
2016-09-13 05:43
We can say that

joseph
2016-09-13 05:46
When we PutState("abc", "xyz"), the ledger will store that pair ("abc", "yxz") into RocksDB instance and the world state. And the world state is stored in RocksDn instance also. Right?

bgorman
2016-09-13 05:49
sounds good to me, yes

bgorman
2016-09-13 05:49
PutState() actually modifies the world state

bgorman
2016-09-13 05:49
you could call it PutWorldState() if you wanted :slightly_smiling_face:

joseph
2016-09-13 05:53
Do you know what type in source code of the fabric refers to the world state?

bgorman
2016-09-13 05:58
from the chaincode it's PutState() and GetState()

joseph
2016-09-13 06:03
I means what Golang struct in the source code that represents the world state?

joseph
2016-09-13 06:05
I see it.

joseph
2016-09-13 06:05
type State struct { stateImpl statemgmt.HashableState stateDelta *statemgmt.StateDelta currentTxStateDelta *statemgmt.StateDelta currentTxUUID string txStateDeltaHash map[string][]byte updateStateImpl bool historyStateDeltaSize uint64 }

hgabor
2016-09-13 07:03
@joseph why do you need the exact structure? from code one should use its interface

joseph
2016-09-13 07:04
I want to know how it works in source code.

hgabor
2016-09-13 07:04
oh okay

hgabor
2016-09-13 07:05
I guess you have already found it but if not the implementation is somewhere undercore/ledger/statemgmt/

balakrishna
2016-09-13 08:10
Hi, i am facing while trying to read attribute from a certificate in chaincode. (creating certificate along with property "role" attached with it from NodeSDK and invoking transaction with certificate as one of the argument. Next, reading the certificate from chaincode and trying to read attribute role from certificate. Error : "Error reading account [Failed retrieving extension.] "

balakrishna
2016-09-13 08:10
i am facing following error.

balakrishna
2016-09-13 08:10
can anyone help me with this ?

roger3cev
2016-09-13 08:35
has joined #fabric

shubhamvrkr
2016-09-13 09:41
Hi. I am trying to use Node SDK on IBM bluemix SAAS using 0.4.1 code. I am not able to enroll a user. I am getting this error I0913 15:10:31.577000000 4984 subchannel.c:642] Connect failed: null I0913 15:10:31.577000000 4984 subchannel.c:645] Retry immediately I0913 15:10:31.577000000 4984 subchannel.c:609] Failed to connect to channel, r etrying

soldat
2016-09-13 12:08
has joined #fabric

lgrace896
2016-09-13 12:55
Hi, when I try and run the member service within vagrant (membersrvc start) I no longer get an output to the console. Is this supposed to happen?

ghaskins
2016-09-13 13:49
@lgrace896: that's FAD. Turn up the logging level to see output

ghaskins
2016-09-13 13:49
I was tripped up by this a few weeks back as well

lgrace896
2016-09-13 13:55
Thanks @ghaskins. How do I do this?

ghaskins
2016-09-13 14:05
Don't recall off the top of my head

lgrace896
2016-09-13 14:12
Okay, no problem. Thanks for your help @ghaskins

jake.turner
2016-09-13 14:13
Hi @ghaskins what does the acronym 'FAD' stand for?

ghaskins
2016-09-13 14:13
Functioning as designed

jake.turner
2016-09-13 14:14
Great, thanks

balakrishna
2016-09-13 14:26
Hi, i am facing while trying to read attribute from a certificate in chaincode. (creating certificate along with property "role" attached with it from NodeSDK and invoking transaction with certificate as one of the argument. Next, reading the certificate from chaincode and trying to read attribute role from certificate. Error : "Error reading account [Failed retrieving extension.] " i am facing following error. can anyone help me with this ?

blafontaine
2016-09-13 14:33
has joined #fabric

balakrishna
2016-09-13 14:37
Hi, I have a question regarding the chaincode data retrieving from table. I have created a table with 3 cols (a,b,c) {given a,b are keys}. Now can i retrieve values from table using only one key ?

mohan
2016-09-13 14:41
Yes, using the GetRows() method. But this will return multiple rows.

mitchkman
2016-09-13 17:31
has joined #fabric

pschnap
2016-09-13 18:28
I'm going to submit a module for review to be used while developing chaincode. I've copied and modified one of the chaincode examples to use this module (as a demonstration). Would it be better to put everything in a single commit or would it be ok to commit the module in one commit and the example in another (then submit the latest for review)?

garisingh
2016-09-13 18:34
I'd submit the module first I believe so we can review it

pschnap
2016-09-13 18:35
ok, I didn't know if the example would be helpful in that process or not

pschnap
2016-09-13 19:26
Alright, I submitted the module for review and it's showing up here: https://gerrit.hyperledger.org/r/#/q/project:fabric

pschnap
2016-09-13 19:26
do I need to seek reviewers or will it be reviewed as some sort of regular process?

ghaskins
2016-09-13 19:28
@pschnap its not strictly required…i regularly scan the list for new entries….however, IMO, if you know that certain people are involved in a particular subsystem, its probably a good idea to add them

ry
2016-09-13 19:29
pschnap you could add cr-fabric if you wanted to get everyone

pschnap
2016-09-13 19:29
@ghaskins you'd be the main one I'd think would want to look at it (btw, msg me if you'd like an example of usage)

ghaskins
2016-09-13 19:29
which patch is it?

ghaskins
2016-09-13 19:30
(and feel free to add me, thats fine)


pschnap
2016-09-13 19:31
there were two e-mails that popped up for you Greg when I added ghaskins

pschnap
2016-09-13 19:31
@ry thanks, do you think I should?

ghaskins
2016-09-13 19:31
i added myself

ghaskins
2016-09-13 19:31
but i assume it was perhaps @gmail.com and @lseg.com

pschnap
2016-09-13 19:32
gmail and novell

ry
2016-09-13 19:32
wtfs

ghaskins
2016-09-13 19:32
gah, the novell one persists

ry
2016-09-13 19:32
I can never kill the novell alias!

ghaskins
2016-09-13 19:32
i havent worked there in 5+ years, heh

ghaskins
2016-09-13 19:32
in any case, it should be all set

pschnap
2016-09-13 19:32
awesome, thanks!

ry
2016-09-13 19:37
pschnap what exactly did you type to get two gregs?

pschnap
2016-09-13 19:38
ghaskins

ry
2016-09-13 19:39
ah hah. gregory haskins expands correctly

pschnap
2016-09-13 19:40
do I need to be on the mailing list for the review process?

ghaskins
2016-09-13 19:43
@pschnap i dont believe so, if you have the gerrit notifications set up correctly it should inform you whenever there is activity on your patch

pschnap
2016-09-13 19:44
hmm, I don't think I set anything up notification-wise

pschnap
2016-09-13 19:45
aha, it seems notifications are sent to the signed-off-by e-mail address. That should work then.

ghaskins
2016-09-13 19:46
i just sent a test-comment

ghaskins
2016-09-13 19:46
did you get notified?

pschnap
2016-09-13 19:46
yup! thanks

ghaskins
2016-09-13 19:46
cool

ry
2016-09-13 19:47
you can set up notifications in your user preferences on gerrit.

pschnap
2016-09-13 19:47
thanks, I'll take a look. I imagine the default settings should suffice

ry
2016-09-13 19:48
@ry uploaded a file: https://hyperledgerproject.slack.com/files/ry/F2B957Z9S/screen_shot_2016-09-13_at_12.47.30_pm.png and commented: this is a bad idea, you’ll get a lot of email


pschnap
2016-09-13 19:52
would submitted changes be only the changes I've submitted or would that be _all_ submitted changes?

ghaskins
2016-09-13 19:52
im actually not sure

ry
2016-09-13 19:54
all

pschnap
2016-09-13 21:01
hm, seems my submission failed to build due to bad imports? It's supposed to be built as part of chaincode, not with the fabric

pschnap
2016-09-13 21:04
(the directory I placed it in is probably not the correct one, but it seemed logical)

garisingh
2016-09-13 21:06
what's your change?

pschnap
2016-09-13 21:12
it's a module that will automatically unmarshal arguments to chaincode "function" invocations; you create a map of "functionName"->function pairs that can respond to an invocation or a query and my module uses reflection to parse the args[] array into the argument types specified by the function being called

pschnap
2016-09-13 21:12
because manual args checking is annoying boilerplate :slightly_smiling_face:

ghaskins
2016-09-13 21:22
obviously I am partial to protobuf/chaintool…can you highlight for us where you see this fitting in? Is it an alternative to chaintool “CCI”, something that enhances it, etc

pschnap
2016-09-13 21:26
I haven't seen what the chaintool can do (I've only been on the periphery of this project). When I first made inquiries you in particular seemed interested in the idea (though we didn't have a chance to discuss it further)

ghaskins
2016-09-13 21:27
And I still am, just trying to understand

pschnap
2016-09-13 21:30
It's something that would allow anyone writing chaincode manually to avoid having to do manual args checking and parsing from strings; instead they would provide well-typed functions and the module would do the parsing for them

pschnap
2016-09-13 21:31
mostly just a convenience

ghaskins
2016-09-13 21:32
with the caveat that I still need to dig in and review, it sounds like it might have relevance to the golang-shim

ghaskins
2016-09-13 21:33
we currently support three chaincode types: “GOLANG” (the original, unmanaged chaincode), “CAR” which is chaintool managed, currently only supports golang based chaincode, and JAVA

ghaskins
2016-09-13 21:34
it sounds like we could add your work under the GOLANG umbrella and it could assist chaincode developers using that form factor

pschnap
2016-09-13 21:35
ah, sorry, i should have specified that it was meant for the golang chaincode from the beginning

ghaskins
2016-09-13 21:36
np

pschnap
2016-09-13 21:42
Wellp, I am done for the day, I'll check back tomorrow. Feel free to e-mail with any questions you have on the submission, and thank you all for your help!

ccooper21
2016-09-14 03:38
In case it helps anyone, I have worked out the process to bootstrap the devenv in an AWS EC2 instance. More information here: https://gist.github.com/ccooper21/fb9ee6dca018885a1ced87cd5c60a935


suri
2016-09-14 06:45
any body help me how to start membershipservices through cmd prompt

bgorman
2016-09-14 06:49
@suri you should just be able to run the binary, or if you want it in the background, you can run `nohup membersrvc&`

bgorman
2016-09-14 06:50
otherwise have a look at the docker-compose yml files in bddtests

suri
2016-09-14 06:56
thank q now i started membership services i started the peer with security enable i am getting following error

suri
2016-09-14 06:56
grpc: ClientConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp [::1]:7054: getsockopt: connection refused"; Reconnecting to "localhost:7054

ranjan008
2016-09-14 06:57
has joined #fabric

suri
2016-09-14 06:57
I startted membership services also

bgorman
2016-09-14 07:09
@suri are your peers in containers or running in dev mode on your PC?

suri
2016-09-14 07:47
s

bgorman
2016-09-14 07:54
if they're in containers then localhost:7054 won't work... if they are in dev mode, it should work if your membersrvc on the same machine (or VM)

mikkop
2016-09-14 09:21
has joined #fabric

mart0nix
2016-09-14 09:40
guys I just found the docs for the shim package: https://gowalker.org/github.com/hyperledger/fabric/core/chaincode/shim

mart0nix
2016-09-14 09:41
and I see there's some kind of a Table functionality

mart0nix
2016-09-14 09:41
are there any good tutorials/examples on the shim API beyond the put/get State

hgabor
2016-09-14 09:46
it seems there aren't any :S

hgabor
2016-09-14 09:46
btw I just checked the tests, they usually contain good examples

hgabor
2016-09-14 09:46
@muralisr ?

muralisr
2016-09-14 11:29
@mart0nix there is one under fabric/bddtests/chaincode/go/table

mart0nix
2016-09-14 11:29
@muralisr great - I will check it out

mart0nix
2016-09-14 11:30
is this some kind of a SQL table ? :))

muralisr
2016-09-14 11:30
no :slightly_smiling_face:

mart0nix
2016-09-14 11:30
what kind of data storage is it appropriate for ? How do you query it ?

oiakovlev
2016-09-14 11:30
I guess it is some linked key-values at the end? is my understanding correct?

oiakovlev
2016-09-14 11:31
so it might be really expensive queries or not really?


muralisr
2016-09-14 11:32
@oiakovlev right, "columns and rows” are implemented based on the same key-value storage used in get/put

muralisr
2016-09-14 11:33
@mart0nix asset management with a chaincode usually maps to a table structure

muralisr
2016-09-14 11:34
along with the examples its best to look at the APIs for the table to understand its usage

mart0nix
2016-09-14 11:34
got it

mart0nix
2016-09-14 11:34
one more question - related to the scalability of extracting transaction payload data as a mechanism to query a data model

mart0nix
2016-09-14 11:35
this is the approach in the car lease demo

mart0nix
2016-09-14 11:35
how scalable is this ?

muralisr
2016-09-14 11:36
querying the blocks for transactions and “building up” history ?

mart0nix
2016-09-14 11:36
yeah

muralisr
2016-09-14 11:36
(I haven’t looked at car lease demo recently)


muralisr
2016-09-14 11:37
its hard to say without looking into the app … I assume they do this to avoid grwoing the global state

muralisr
2016-09-14 11:38
oh I see

garisingh
2016-09-14 11:40
@mart0nix - the car lease demo basically built a block viewer. Is that what you are asking about? And as I recall, it will only bring back the latest X blocks (although I think you can scroll back). We also implemented this same concept in the BMX dashboard for blockchain and it's also part of the explorer project recently contributed to hyperledger

mart0nix
2016-09-14 11:41
@garisingh that's the feedback

mart0nix
2016-09-14 11:41
I'm basically developing an app that involves an asset that changes hands many times until it reaches its final destination

mart0nix
2016-09-14 11:42
while it's clear to me how to maintain current status in the world state

mart0nix
2016-09-14 11:42
I'm exploring scalable ways of recording the history of that asset

mart0nix
2016-09-14 11:42
so that I can query an asset with a serial number 1234566 and see all the history (change of custody/ownership)

garisingh
2016-09-14 11:43
well there's the short term and long term answer. The long term answer is that the fabric v1.0.0 will have the ability to query historical state

garisingh
2016-09-14 11:45
this was a gap identified in the current architecture. Also - the blocks don't technically contain the actual state at any point in time (they have the transaction and state deltas - but you'd still need to know a starting or ending state plus which transactions modified which keys)

garisingh
2016-09-14 11:47
so people have tried various ways to achieve what you want: 1) You have a single key per asset and a value structure which has an array of historical things you want to track 2) You can attempt to use range queries where your prefix is your asset number 3) You can try to use the table APIs (which are higher level abstraction on doing 2) )

muralisr
2016-09-14 11:48
right, more “state” as opposed to just “transaction” information you need to manipulate, more you have to do it with chaincode logic

muralisr
2016-09-14 11:49
one more way - create a new chaincode for each asset (which is inefficient for most use cases)

garisingh
2016-09-14 11:50
I've also consider maintaining this outside the blockchain - where you could always point back to the block which contained the transaction as well

mart0nix
2016-09-14 11:51
@garisingh well the transaction itself could be used as a data model unit

mart0nix
2016-09-14 11:51
if you can extend the protocol and include indexed values

mart0nix
2016-09-14 11:51
seller: ...., buyer, .... serial_number ...

mart0nix
2016-09-14 11:53
use some kind of a scalable data structure to index the fields that could be used as filter criterias

mart0nix
2016-09-14 11:54
bloom filter or something like this

mart0nix
2016-09-14 11:54
does that make sense ?

garisingh
2016-09-14 11:54
so this is pretty much what we are doing with the new ledger in v1.0.0

mart0nix
2016-09-14 11:55
oh nice

mart0nix
2016-09-14 11:55
when is v1.0.0 due ?

mart0nix
2016-09-14 11:55
: )

garisingh
2016-09-14 11:56
in progress now with incremental deliveries every month. hopefully in a few weeks we'll have the basic happy path working across all the new components

mart0nix
2016-09-14 11:58
so v1.0 will come out before the end of this year or ...?

mart0nix
2016-09-14 11:59
I'm trying to figure out if I should start working on a work-around. If it's going to be only a few weeks for v.1.0 I may as well just wait since that sounds like the right way to do these kinds of things

garisingh
2016-09-14 12:06
well we'll have working code by end the year - official release is targeted for March 2017

muralisr
2016-09-14 12:08
@mart0nix the other option would be to build the chaincode with the limitations … that way you can check if the features solve those as and when they come in ?

muralisr
2016-09-14 12:09
pros and cons of course… just a thought

mart0nix
2016-09-14 12:11
well thanks for the info. I think I will read some more examples to figure out how easy it would be do implement my use case

mart0nix
2016-09-14 12:11
my use case involves unique serial identifier

mart0nix
2016-09-14 12:12
which kinda makes it easy

mart0nix
2016-09-14 12:12
but the issue is that there's meta information that should also be query-able (owner, timestamp, etc...) in addition to the the unique identifier

mart0nix
2016-09-14 14:09
hmm

mart0nix
2016-09-14 14:09
what about logging abilities ?

mart0nix
2016-09-14 14:10
I see there's a chaincode logger

mart0nix
2016-09-14 14:10
where do the log files get stored ?

lbonniot
2016-09-14 14:27
Hi, is there any announced release date for the v0.6-dev-preview ? Thx

ghaskins
2016-09-14 16:18
who are the best contacts for the Z and P platforms?

ghaskins
2016-09-14 16:18
in terms of working to get resources for the jenkins pipeline

ghaskins
2016-09-14 16:19
@vpaprots you are my best bet on the Z side

ghaskins
2016-09-14 16:19
any pointers/introductions helpful

garisingh
2016-09-14 16:19
I think Z but be a little behind as they have a lot of other things going on. Let me find the right person on the P side

ghaskins
2016-09-14 16:19
@garisingh thank you

ghaskins
2016-09-14 16:20
i feel like part of the reason they are behind is because in the past I have been a gate for baseimage

ghaskins
2016-09-14 16:20
part of what I am working on now is automating this process, but I want to line up the z/ppc stuff too so it doesnt get even more further behind

garisingh
2016-09-14 16:21
agreed - because actually we want to get Power images being published to dockerhub for the v0.6 release in line with the x86 images. Z as well if possible but their resources are tied up on a few other things

ghaskins
2016-09-14 16:22
cool….well, i think as long as we can get a jenkins worker for whatever $arch you want, it should be straight forward

ghaskins
2016-09-14 16:22
(assuming it can reasonably execute a docker build, etc

ghaskins
2016-09-14 16:23
LF has a nice cloud/openstack based setup for x86…it just creates an ephemeral VM whenever I start a new build-job

ghaskins
2016-09-14 16:23
but it doesnt have to be that sophisticated

ghaskins
2016-09-14 16:23
as long as jenkins can use it

garisingh
2016-09-14 16:26
cool. just pinged my contact on Power for him to have their automation guy(s) reach out to you

ghaskins
2016-09-14 16:27
ty

vpaprots
2016-09-14 16:58
@ghaskins I have been busy with all the z crypto stuff.. but yeah, seems we fell off the CI bandwagon.. I actually been making lots of loud noises about that to anyone who will listen. @harrijk John is a great resource for building things on z (https://github.com/harrijk/docs)

vpaprots
2016-09-14 16:58
it would be nice to get that into fabric at some point..

ghaskins
2016-09-14 17:00
ty @vpaprots

ghaskins
2016-09-14 17:00
what we need in this case is someone who will work with LF on providing jenkins worker resources for the $arch in question

ghaskins
2016-09-14 17:00
i know Z already has something in place, though my understanding is it is currently offline

ghaskins
2016-09-14 17:01
it doesnt look like P has any representation at all right now

vpaprots
2016-09-14 17:03
Ramesh has always been my point man on the builds, he monitored them and poked me every time something breaks.. I've been arguing that we need somebody full time for Z to keep up with build breaks. We are spread bit thin atm with all the things we like to get in..

ry
2016-09-14 17:04
Z VMs were recycled AFAIK

ghaskins
2016-09-14 17:09
ultimately I wont be gated by anything != x86, but I wanted to queue up the alt-arch conversation so its not a surprise to anyone

bsmita
2016-09-14 19:44
has joined #fabric

bsmita
2016-09-14 19:47
@ghaskins , @srirama_sharma and I are working on uploading docker images for v0.6 release. I have seen your comment regarding resources contact for Power. I am working with Ramesh to have the builds in the community CI.

ghaskins
2016-09-14 19:48
ok cool…as long as there are jenkins workers for power that are capable of running docker-build, i think ill have what I need

ghaskins
2016-09-14 19:49
can you explain in more detail what you mean by “working on uploading” ?

bsmita
2016-09-14 19:49
The Power node is not enabled yet, but prep work was done on it, we are waiting on the v 0.6 branch cut, so

ghaskins
2016-09-14 19:49
(by that, i mean, what process are you using

ghaskins
2016-09-14 19:49
because IIUC, all uploads will be done by jenkins eventually

bsmita
2016-09-14 19:50
Ramesh put a patch in place to support Power platform, so when the build pass unit-test, behave test, the Jenkins master will upload images to dockerhub

ghaskins
2016-09-14 19:50
ok, good

ghaskins
2016-09-14 19:50
we need to coordinate on image/tag names though, so keep me in the loop on this

bsmita
2016-09-14 19:52
Sure, we are waiting for v0.6 branch so that Ramesh can point the Jenkins build to a private repo and try a build. We are planning a private repo now due to FAB#358

bsmita
2016-09-14 19:52
Srirama is working on a patch for this issue.

ghaskins
2016-09-14 19:53
let me know as soon as there is a ppc worker available that I can test with

bsmita
2016-09-14 19:54
The power node is online now, if that's what you are looking for

ramesh
2016-09-14 19:54
@ghaskins sure.

ghaskins
2016-09-14 19:55
@ry I see “hyp-power-1” idling in production jenkins, but its not in sandbox….possible to expose it there too?

ry
2016-09-14 19:56
@ghaskins: I'm at lunch will get to it soon

ghaskins
2016-09-14 19:56
@ry no rush, thx

garisingh
2016-09-14 20:43
@ghaskins let me know when we try to figure out the actual image names and tags

ghaskins
2016-09-14 20:45
@garisingh ok…i think it will really boil down to one of two options

ghaskins
2016-09-14 20:45
$(name)-$(arch):$(version), or $(name):$(arch)-$(version)

ghaskins
2016-09-14 20:46
currently, the stuff I have worked on has used the latter but some of the stuff @ramesh has been doing uses the former

ghaskins
2016-09-14 20:46
I used the $(arch)-$(version) stuff in the past because :latest wasnt a relevant consideration at the time

ghaskins
2016-09-14 20:46
however, @ramesh does bring up a good point about it now

ghaskins
2016-09-14 20:47
so its something to consider

ghaskins
2016-09-14 20:47
im a little torn: with the new versioning stuff I have recently introduced and continue to refine, the :latest tags become an actual possibility

ghaskins
2016-09-14 20:47
but, it bothers me a little bit that it forces _everything_ to make $arch explcit

ghaskins
2016-09-14 20:48
e.g. “docker run hyperledger/fabric-x86_64-peer” seems awkward

ghaskins
2016-09-14 20:48
but that said, without that, we cant have latest at all

garisingh
2016-09-14 20:48
$(name)-$(arch):$(version) is the option I vote for FWIW

ghaskins
2016-09-14 20:48
so I see his poit

ghaskins
2016-09-14 20:49
point

ghaskins
2016-09-14 20:49
cool, i think its the way I am leaning too

garisingh
2016-09-14 20:50
I'll be completely transparent here - I want to be able to put out a set of docker compose files and need to be able to explicitly choose the "version" but also need multi arch support. I think that if we plan to use Docker as a delivery vehicle for releases, that is the best way to go

ghaskins
2016-09-14 20:50
one possibility (and no offense to my P/Z brethren), a middle ground could be we special case x86

garisingh
2016-09-14 20:50
yes

garisingh
2016-09-14 20:50
I think that's fine

ghaskins
2016-09-14 20:51
e.g. x86 is undecorated

garisingh
2016-09-14 20:51
as long as we use the version as the tag, I'm good

ghaskins
2016-09-14 20:51
yeah, thats a given

garisingh
2016-09-14 20:51
perhaps some day Dockerhub will have arch support

ghaskins
2016-09-14 20:52
I thought IBM had some contributions going in in that regard?

garisingh
2016-09-14 20:52
I think so as well since we have 2 of the big architectures that need to be supported

kletkeman
2016-09-14 21:33
quick question ... latest code in archives (compatibility with 0.5 necessary) ... deploying via modified yeasy/docker-compose ... and I get this error when spinning up the network ... deploy was previously successful, but this error was masked because I had a residual env var for DEBUG level logging lying around (bad idea with pbft) ... vp1_1 | 21:27:23.659 [dockercontroller] Start -> ERRO 027 start-could not start container API error (400): {"message":"starting container with HostConfig was deprecated since v1.10 and removed in v1.12"} vp1_1 | 21:27:23.659 [chaincode] Launch -> ERRO 028 launchAndWaitForRegister failed Error starting container: API error (400): {"message":"starting container with HostConfig was deprecated since v1.10 and removed in v1.12"} Thoughts on what a quick fix might be? It seems I have the latest docker ... do I need to downgrade?

kletkeman
2016-09-14 21:59
looks like the API error is real and a product of docker-java issues ... downgrading is the recommended solution but failed for me ...

kletkeman
2016-09-14 21:59
so ... anyone else run into docker 1.12 failures? or has the launch method perhaps changed in Gerrit?

kletkeman
2016-09-14 22:01
here is the issue that is tracking this problem: https://github.com/docker-java/docker-java/issues/617

ry
2016-09-14 22:12
kletkeman we’re using this for CI: "Ubuntu 14.04.4 - fabric - DOCKER 1.8.5 PROTOC 3.0 JQ 1.5 VAGRANT 1.8.5 - 20160909.1534"

ry
2016-09-14 22:12
we took multiple bites of the Docker 1.1[012] apple and it didn’t work for us

kletkeman
2016-09-14 22:21
@ry And so I am finding as well. I tried downgrading to 1.8.x and was stopped by permissions on a wget. I suppose I will dig around and find that version and just copy it over top of the 1.12 as was suggested in some other thread somewhere. Sigh ... who'd a thunk that Java chaincode support was going to throw such a nasty wrench into this project ... thanks for the confirmation.

ry
2016-09-14 22:23
@kletkeman It has been a frustrating journey, for sure.

kletkeman
2016-09-15 00:08
@ry It looks like go-dockerclient needs to be updated for 0.6 in order to work with API 124 ... I don't know if that will happen, so I guess I'll take the pain of rebuilding my dev environment with the older versions ...

ry
2016-09-15 00:49
@ghaskins ^^^

ghaskins
2016-09-15 00:50
I have no problem with pinning the devenv to < 12 but it seems like that is not a tenable long term solution

ghaskins
2016-09-15 00:51
So if the go-docker client just needs an update, that is preferable

ghaskins
2016-09-15 00:51
That said, pinning it in general seems like a good idea

ghaskins
2016-09-15 00:52
I'll roll that into the plan

kletkeman
2016-09-15 00:54
@ghaskins there have been changes to start container in the newer version of the go-dockerclient here: https://github.com/hyperledger/fabric/blob/24c7483a2154df5a2d915b1a3b656e914cde7501/vendor/github.com/fsouza/go-dockerclient/container.go#L674-L703 ... I presume that using the latest docker version isn't causing anyone issues in the newer repository?

ghaskins
2016-09-15 00:55
Oh i see

ghaskins
2016-09-15 00:56
So this is only a problem since the old devenv and old fabric use docker:latest

ghaskins
2016-09-15 00:56
But if you are current, everything works?

ghaskins
2016-09-15 00:57
Guess nothing can be done for old code in that case, but pinning it should mitigate this from happening again

kletkeman
2016-09-15 01:00
@ghaskins Well, I've been fighting to get a 4 peer network functioning for a couple of days now ... the doc split makes that a little tougher than necessary and the crush of debug statements doesn't help. At some point, I got everything working just as I upgraded the docker version ... that was a bad call on my part. There was some elusive reason why I did it, but of course backing it out has cost me hours. I've been forced to rebuild vagrant from scratch and that is now failing to recreate the peers ... it's always something it seems. So the short answer is "I think so" ... as in everything should work once I get my environment sane again. By the way, with 4 peers and pbft, the four peer containers take a really long time to appear. But they do eventually ...

kletkeman
2016-09-15 01:01
Oh ... I should be more clear ... part of that time was trying to debug on bluemix, and I had to give that up when 2 peers crashed out of the blue. But looking at logs on there is pretty annoying, which is why I decided to go docker-compose etc ...

kletkeman
2016-09-15 03:14
hmmm ... blew away the vagrant vm, built it all up from scratch, replaced the go-dockerclient and rebuilt the peer, and no change ... I guess the downgrade of docker is mandatory ...

suri
2016-09-15 05:23
any body help me i started my peer and i am running my chaincode while running i am getting this exception

suri
2016-09-15 05:23
code: -32602, message: 'Invalid params', data: 'Chaincode name may not be blank in development mode.'

suri
2016-09-15 05:24
my code is like this { "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID":{ "path":"githubURl" }, "ctorMsg": { "function":"init", "args":[""], }, "secureContext": "jim" }, "id": 34 }

bgorman
2016-09-15 05:27
@suri and you are running your peer with `--peer-chaincodedev`?

bgorman
2016-09-15 05:29
I think you need to change "chaincodeID":{ "path":"githubURl" }, to "chaincodeID":{ "name":"someNameYouPassYourChaincodeBinary" },

bgorman
2016-09-15 05:31
the name comes from `CORE_CHAINCODE_ID_NAME=someNameYouPassYourChaincodeBinary CORE_PEER_ADDRESS=0.0.0.0:7051 ./chaincode_example02`

madmanbts
2016-09-15 05:43
has joined #fabric

suri
2016-09-15 06:14
thank q

ranjan008
2016-09-15 10:29
how can i create a CA of my own and also create an user which will get authorized by the created CA

ranjan008
2016-09-15 10:34
And is there any other way of creating user other than using membersrvc.yaml file

zaki
2016-09-15 19:24
@ranjan008 An Admin level user can register new users via the API

zaki
2016-09-15 19:25
Does anyone have any guidance on how to modify docker compose files in the bddtests so the peer containers can interact with docker daemon to deploy chaincodes?

zaki
2016-09-15 19:32
Please @ me if you have an answer about the compose modifications

ghaskins
2016-09-15 19:33
@zaki are you running compose from the devenv?

ghaskins
2016-09-15 19:34
if you are running from the devenv, the docker configuration should already be set up properly for you

ghaskins
2016-09-15 19:34
if you are not, I suspect you need to set your DOCKER_OPTs appropriately

cbf
2016-09-15 19:39
@zaki native docker or docker toolbox? if native then I believe that the missing ingredient is the need to mount /var/run/sock.... let me dig up the example

ghaskins
2016-09-15 19:40
@cbf I thought we use TCP endpoint?


cbf
2016-09-15 19:40
you cannot with native docker beta on mac and windoze

cbf
2016-09-15 19:40
the networking isn't there yet

ghaskins
2016-09-15 19:40
ah, interesting

ghaskins
2016-09-15 19:40
btw: docker on mac seems to have been released

cbf
2016-09-15 19:41
I have it;-)

ghaskins
2016-09-15 19:41
me too :wink:

ghaskins
2016-09-15 19:41
as of yesterday

ghaskins
2016-09-15 19:41
very slick

zaki
2016-09-15 19:41
Thanks guys this is a little clearer

ghaskins
2016-09-15 19:41
@zaki yw

ghaskins
2016-09-15 19:42
man, the dockerhub UI seems messed up

ghaskins
2016-09-15 19:42
searches not working

ghaskins
2016-09-15 19:42
anyone else seeing that?

zaki
2016-09-15 19:43
Planning to switch from Linux to Mac when the new Macbook Pros come out. Glad to see the docker experience improving

ghaskins
2016-09-15 19:45
im hoping they update the RAM limit

ghaskins
2016-09-15 19:45
16G just doesnt cut it

zaki
2016-09-15 19:45
Secure Enclave and more RAM is what I'm hearing

ghaskins
2016-09-15 19:46
same

ccooper21
2016-09-16 05:23
This is probably more of a Docker issue than an HL issue, but does anyone know how to resolve this? ``` ubuntu@hyperledger-devenv:v-44e1d30:/hyperledger$ make unit-test Building build/docker/bin/peer docker: An error occurred trying to connect: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create: read unix @->/var/run/docker.sock: read: connection reset by peer. See 'docker run --help'. make: *** [build/docker/bin/peer] Error 125 ```

ccooper21
2016-09-16 05:26
I had successfully built the peer before, but the IP address of my VM has changed since then. I'm guessing this is contributing the error, but I'm not sure where it may be stored.

zhangsoledad
2016-09-16 07:39
has joined #fabric

ccooper21
2016-09-16 07:41
hmm.. re: my earlier error apparently I needed to reinstall Docker. weird

humblealex
2016-09-16 08:06
has joined #fabric

ranjan008
2016-09-16 10:16
can we modify the .yaml file which is inside the chaincode after deploying it to the chain

cbf
2016-09-16 11:56
@ranjan008 that config is for the membersrvc component, not the chaincode. Please read the README here: https://github.com/hyperledger/fabric/tree/master/examples/chaincode/go/asset_management02

cbf
2016-09-16 11:57
Basically, the asset.yaml is used by the asset_management02_test.go test (use go test to run the test) to configure the membersrvc with the necessary identities

ranjan008
2016-09-16 11:58
@cbf yes ofcource but if i am adding some user after deploying the chaincode in the chain and i want to give access to the user for that chaincode can that be done

cbf
2016-09-16 11:58
not yet, there is, I believe, a patch being reviewed to add dynamic addition of users via the SDK

cbf
2016-09-16 11:59
the config approach is just for testing

muralisr
2016-09-16 11:59
@muralisr uploaded a file: https://hyperledgerproject.slack.com/files/muralisr/F2CCN8U03/pasted_image_at_2016_09_16_07_57_am.png and commented: @cbf @ramesh https://gerrit.hyperledger.org/r/#/c/1057/3 is failing on bdd tests.. I thought bdd test failures are ignored now ?

ranjan008
2016-09-16 11:59
@cbf Thanks for the clarification

ranjan008
2016-09-16 12:00
so in future we can expect these facilities to be there

cbf
2016-09-16 12:01
yes absolutely

ranjan008
2016-09-16 12:01
thanks @cbf

cbf
2016-09-16 12:02
@muralisr the behave tests are not contributing to the gate, but are being run to enable debugging

muralisr
2016-09-16 12:02
ok

cbf
2016-09-16 12:02
the abort resulted from the run taking more than 2 hours

cbf
2016-09-16 12:02
I retriggered the build

muralisr
2016-09-16 12:02
I see

muralisr
2016-09-16 12:02
thank you @cbf

muralisr
2016-09-16 12:12
I’ve pinged Jeff about this as well… its always failing here in this change

mart0nix
2016-09-16 12:21
guys how do you go about testing chaincode when deploying locally?

mart0nix
2016-09-16 12:21
CLI or REST ?

mart0nix
2016-09-16 12:21
curl on the command line sounds good but the json payload is hard to accommodate

cbf
2016-09-16 12:23
SDK is probably the best approach

mart0nix
2016-09-16 12:25
@cbf

mart0nix
2016-09-16 12:25
thanks I will take a look

mart0nix
2016-09-16 12:28
ibm-blockchain-js is not the same thing as the new SDK HFC...correct ?

cbf
2016-09-16 12:33
no, the ibm-blockchain-js was written before the node SDK (hfc). I don't believe that it is current with master. It is pegged to what was running in Bluemix (v0.5).

cbf
2016-09-16 12:34
@mart0nix we just merged some improvements to the nodeSDK documentation. There's a fully working example (as opposed to a fragment)

cbf
2016-09-16 12:34
the code for that should be merged within the next day or so.

mart0nix
2016-09-16 12:42

muralisr
2016-09-16 13:12
@mart0nix right


cbf
2016-09-16 13:13
I need to fix the readthedocs because looks like the links are broken

n-sawada
2016-09-16 13:24
has joined #fabric

mart0nix
2016-09-16 13:29
@cbf awesome thanks

mart0nix
2016-09-16 13:29
btw: i find GitHub a horrible place for documentation

mart0nix
2016-09-16 13:29
may be it's just me

mart0nix
2016-09-16 13:30
i keep 4-5 tabs open with resources that I wouldn't know how to find again

cbf
2016-09-16 13:48

cbf
2016-09-16 13:48
but as noted, I just noticed some broken links in the SDK docs

ghaskins
2016-09-16 13:54
@ghaskins uploaded a file: https://hyperledgerproject.slack.com/files/ghaskins/F2CF667U4/screen_shot_2016-09-16_at_9.53.23_am.png and commented: @cbf: I just performed an “integrity” scan of the docs, Here is the summary of bad links

donovanhide
2016-09-16 13:54
has joined #fabric



arconederveen
2016-09-16 13:56
has joined #fabric

mart0nix
2016-09-16 13:56
but I get errors with the docker-compose file

mart0nix
2016-09-16 13:56
ERROR: In file './docker-compose.yml', service 'links' must be a mapping not an array.

mart0nix
2016-09-16 13:57
ERROR: In file './docker-compose.yml', service 'tty' must be a mapping not a boolean.

mart0nix
2016-09-16 13:57
does anyone know a quick fix for these ?

garisingh
2016-09-16 14:10
@mart0nix - my guess is that you did a cut and paste directly from the html page you posted above. Basically when you do that it did not preserve formatting. Easiest thing to do is to hit the "Raw" button and then copy the contents from there (you'll see that you now have proper indentation / formatting)

mart0nix
2016-09-16 14:12
@garisingh well the reason I copied and pasted was because the link was broken: https://raw.githubusercontent.com/hyperledger/fabric/master/examples/sdk/node/example02/docker-compose.yml

mart0nix
2016-09-16 14:12
I get a 404 for that

garisingh
2016-09-16 14:15
yeah - figured that. so just view the "Raw" content of that page and copy the contents from there and you should be good (at least format wise)

arvin
2016-09-16 14:19
has joined #fabric

cbf
2016-09-16 14:38
@mart0nix hold off on that a sec… I am preparing an environment for you

cbf
2016-09-16 14:38
the docs are a bit off

mart0nix
2016-09-16 14:38
@cbf ok thanks

andriian
2016-09-16 16:00
has joined #fabric

cbf
2016-09-16 16:56
@mart0nix still working on this… I upgraded by Docker to 1.12.1 and something’s not right…

garisingh
2016-09-16 17:16
@cbf - what error are you seeing?

garisingh
2016-09-16 17:19
does `hyperledger/fabric-node-sdk` actually exist?

ry
2016-09-16 18:18
@cbf we haven't been able to make docker > 1.8 work for CI

ry
2016-09-16 18:18
@garisingh: it exists but I don't think they've merged yet

ry
2016-09-16 18:24

ccooper21
2016-09-16 18:24
I'm trying out HL outside of development mode for the first time using multiple VPs. When I try to deploy my chaincode, I'm seeing errors like the following in the `peer` console. ``` 18:20:01.840 [dockercontroller] Start -> ERRO 036 start-could not recreate container cannot connect to Docker endpoint 18:20:01.840 [chaincode] Launch -> ERRO 037 launchAndWaitForRegister failed Error stating container: cannot connect to Docker endpoint 18:20:01.840 [consensus/pbft] execDoneSync -> INFO 038 Replica 3 finished execution 3 trying next ``` Any ideas or suggestions? Thanks!

muralisr
2016-09-16 18:28
@ccooper21 you probably need to set CORE_VM_ENDPOINT to the right docker daemon endpoint. It defaults to unix:///var/run/docker.sock.

ccooper21
2016-09-16 18:30
I was following the instructions for the block-listener example. This is the command line I used to instantiate the first docker container: `docker run --rm -it -e CORE_VM_ENDPOINT=http://172.17.0.1:2375 -e CORE_PEER_ID=vp0 -e CORE_PEER_ADDRESSAUTODETECT=true -e CORE_PEER_VALIDATOR_CONSENSUS_PLUGIN=pbft hyperledger/fabric-peer peer node start`

ccooper21
2016-09-16 18:31
What is supposed to be listening on port 2375? Is that docker itself? Maybe I need start some service on my docker host?

garisingh
2016-09-16 18:31
docker daemon

garisingh
2016-09-16 18:31
you need to pass the `-H ` argument when you start the daemon

ccooper21
2016-09-16 18:37
thanks! I had to reinstall Docker due to an issue last night and it looks like the settings the devenv `setup.sh` script installs got blown away

ccooper21
2016-09-16 18:44
Argh!! I applied the changes to the `/etc/default/docker` file and am now back to the error that made me reinstall Docker last night. `syslog` shows that the Docker daemon is just continually restarting

ccooper21
2016-09-16 18:58
Apparently the `-s aufs` option was breaking things.

sbarclay
2016-09-16 22:48
hey- who’s the admin for JIRA for the fabric? Need to reset my password and apparently need an admin to do that. Thanks

ry
2016-09-16 22:52
sbarclay go to http://identity.linuxfoundation.org and do a password recovery/reset

sbarclay
2016-09-16 22:52
ah- sweet. thanks @ry

baohua
2016-09-17 00:28
@ccooper21 what version of docker are u using? Can u try the following configuration? it works from Docker 1.9.0 ~ 1.12.1 in my local environment. DOCKER_OPTS="$DOCKER_OPTS -H -H unix:///var/run/docker.sock --api-cors-header='*' "

ccooper21
2016-09-17 00:31
Docker v1.12.1. I am using the Vagrant/devenv scripts to set everything up but trying to run in an AWS EC2 VM. The problem I seem to be having is that the scripts update the kernel, and afterwards once I reboot Docker is broken. Docker works okay once the setup is complete as long as I don't reboot.

ccooper21
2016-09-17 00:41
@baohua Thanks for the suggestion though. I was able to start Docker with those settings but then got a build error when running the tests. I wasn't sure if it might be due to leaving off the `-s aufs` Docker option.

baohua
2016-09-17 00:42
can i know what os are u using?

ccooper21
2016-09-17 00:42
Unfortunately, while I'm familiar with the Docker concept this is more or less my first time getting hands-on experience.

ccooper21
2016-09-17 00:42
Ubuntu 14.04

baohua
2016-09-17 00:43
if you’re not quite familar with docker/vagrant before, i would suggest u try another option, maybe a little simpler than this way.

baohua
2016-09-17 00:44

ccooper21
2016-09-17 00:44
I'm very familiar with Vagrant and that worked fine. I just don't have a lot of memory on my laptop so would like to get things working at AWS.

ccooper21
2016-09-17 00:44
Will take a look...

baohua
2016-09-17 00:44
it totally utilizes Docker without vagrant and local building.

baohua
2016-09-17 00:45
what u need is just to find a vm, and just `bash setupPbft.sh` to do some simple setup :slightly_smiling_face:

ccooper21
2016-09-17 00:45
nice! Thanks for sharing

baohua
2016-09-17 00:46
vagrant needs to create vm, hence not that convenient within vm.

baohua
2016-09-17 00:46
sure, enjoy and welcome for feedbacks. The scripts have been evaluated for half a year.

ccooper21
2016-09-17 00:54
@baohua It looks like your Docker Compose files depend on Docker containers you have posted to Docker Hub. How often do you refresh them?

ry
2016-09-17 01:00

baohua
2016-09-17 02:15
it’s automatically built by triggering, hence will be very frequently. @ccooper21

baohua
2016-09-17 02:17
@ry Great, when can we have the z and ppc images?

ry
2016-09-17 02:17
baohua: ghaskins is working on that, but right now we don’t have Z builders

baohua
2016-09-17 02:19
sure, and about the naming of the image, can we put the release number at the head? e.g., 0.6.0-preview-x86_64?

baohua
2016-09-17 02:20
this will be convininent for sorting and searching.

baohua
2016-09-17 02:20
convenient :slightly_smiling_face:

ghaskins
2016-09-17 02:20
There is a proposal to move the $arch out of the tag and into the name

ghaskins
2016-09-17 02:21
That would have similar impact

ghaskins
2016-09-17 02:21
But the final schema still needs to be agreed upon

baohua
2016-09-17 02:23
sure, noticed it, and we can highlight that at the proposal. @ghaskins

bis
2016-09-17 02:40
has joined #fabric

ashishkel
2016-09-17 04:54
Guys, can we fire Rest APi with something like this ? {"jsonrpc":"2.0","method":"query","id":"5","params":{"type":1,"chaincodeID":{"name":"testscName"},"ctorMsg":{"function":"CreateRoleWithoutPC","args":*[[],["GE5","GEO 5","","","20090211","20091231","1","235959"]]*},"secureContext":"jim"}}

ashishkel
2016-09-17 04:55
args as a 2 dimensional array ??

ashishkel
2016-09-17 04:55
is this supported ?

ashishkel
2016-09-17 04:55
CLI does not seem to support. Its showing *Error: Chaincode argument error: json: cannot unmarshal array into Go value of type string*

ashishkel
2016-09-17 05:22
anyone can help ?

ccooper21
2016-09-17 06:01
@ashishkel I think for now you can only pass an array of strings via the REST API. While a bit crude, you could always turn your more complicated structure into a string and then unpack it yourself in your chaincode.

ccooper21
2016-09-17 06:04
On a different topic, I noticed that the README for the Blockchain Explorer doesn't render correctly on the Github site. New lines are not shown in the quoted text due to incorrect markdown being used. I'd like to submit the trivial fix for this.

ccooper21
2016-09-17 06:05
1. Do I need to raise a Jira issue to be able to submit this fix? 2. If so, do I create one under the general Fabric project? The explorer is a standalone project at the moment, but I don't see it identified as a project in Jira.

ashishkel
2016-09-17 06:11
oh, If its not identified as a part of Hyperledger, then i guess it wont be associated in jira as well.

ashishkel
2016-09-17 06:12
we should bring it to the notice of @cbf . Chris should be able to take care of that..

ccooper21
2016-09-17 06:13
Just to be clear, I am referring to this (which is now a mirror of a Gerrit repository): https://github.com/hyperledger/blockchain-explorer

ashishkel
2016-09-17 06:15
i got it,. looks like a small miss while creating the Jira projects

tcnthomas
2016-09-17 08:23
has joined #fabric

cbf
2016-09-17 11:09
@ccooper21: please feel free to file a jira and submit a patch. It isn't a requirement to file a jira, but it does help us track things. LMK if you need any help with this.

cbf
2016-09-17 11:10
I'll have a component added to JIRA

donovanhide
2016-09-17 14:21
Are there any docs for installing the `peer` tool locally? Seems like there is some lightly fiddly rocksdb linking and versioning issues for me on OS X.

donovanhide
2016-09-17 14:23
Also, does anyone have some opinions on distributing a developer environment as a docker image as well as a vagrant one? Seems quite long-winded to have both Docker and Vagrant installed :slightly_smiling_face:

donovanhide
2016-09-17 14:34
Ahh, nevermind can just ```docker exec -it ripplelike_vp0_1 bash```

donovanhide
2016-09-17 14:50
Actually, it would be useful to have a local (non-docker and non-vagrant) `peer` command available. Is this an easy possibility?

cbf
2016-09-17 16:00
it can be built on mac, have not tried windoze

cbf
2016-09-17 16:00
if you dig in the docs, there's info on how to build on macosx

cbf
2016-09-17 16:01
you can use docker for mac or windows which is pretty light weight

mart0nix
2016-09-17 17:13
@cbf any luck with the dev environment? I also had problems with Docker on Mac and I had to install the beta branch before Docker worked on my Mac

donovanhide
2016-09-17 18:19
@cbf On OS X I followed: https://github.com/hyperledger/fabric/blob/master/docs/dev-setup/build.md#building-natively-on-osx but got: ```$ make peer Building docker base-image BUILD-CACHE: exists! stdin: is not a tty Sending build context to Docker daemon 11.78 kB Error response from daemon: ENV must have two arguments make: *** [build/image/base/.dummy] Error 1``` Also feels like there is a need for a lightweight API client in Go, which doesn’t have the rocksdb dependency?

cbf
2016-09-17 18:20
I agree, and I am working on that

cbf
2016-09-17 18:20
still having issues with docker 1.12.1

cbf
2016-09-17 18:21
I may try backing off to 1.12 beta

donovanhide
2016-09-17 18:22
I’ve happily been running the docker images for the peer and membersvc elements, it’s just for developing chaincode locally and then deploying that I need a CLI client. `peer` seems to be the only one available in Go so far, is that the case?

mart0nix
2016-09-17 18:22
@donovanhide the SDK is coming out soon

mart0nix
2016-09-17 18:23
@cbf try the beta channel

donovanhide
2016-09-17 18:24
@mart0nix Great! Will that turn up as a separate repository, or be embedded in the fabric repo?

donovanhide
2016-09-17 18:25
Would be keen to beta test if possible!


cbf
2016-09-17 18:26
the sdk with v0.6 is available, (npm install hfc) but it is also being refactored

donovanhide
2016-09-17 18:27
Kind of just looking for a Go CLI tool for invoking and deploying chaincode. A `peer`-lite I guess… Is that something I could help with?

donovanhide
2016-09-17 18:29
Just trying to build a workflow for myself and colleagues that doesn’t involve more than just Go and Docker.

mart0nix
2016-09-17 18:29
@cbf the HFC will be able to function outside of vagrant environment right ?

cbf
2016-09-17 18:32
yes

cbf
2016-09-17 18:33
@donovanhide I have been working on teasing out the cli function from peer

donovanhide
2016-09-17 18:33
@cbf that sounds great!

cbf
2016-09-17 18:33
have not yet pushed to Gerrit, but I can prob get that this weekend

donovanhide
2016-09-17 18:34
No rush at all, as long as I know which repo to monitor.

donovanhide
2016-09-17 18:38
A bit of feedback on the Go directory structure. It would be fantastic to be able to just `go get http://github.com/hyperledger/fabric/peer` and that builds the binary. The repo seems quite full of Docker and Vagrant image creation tools and scripts which perhaps should live in a separate repo that makes use of the main one?

donovanhide
2016-09-17 18:38
I know it gets complicated with vendoring :slightly_smiling_face:

cbf
2016-09-17 18:40
yeah, the vendoring is the messy part

cbf
2016-09-17 18:41
the package organization is a bit tangled

cbf
2016-09-17 18:41
needs untangling

cbf
2016-09-17 18:41
I have not yet got it building stand-alone without rocksdb

cbf
2016-09-17 18:41
but I do have it built on mac

donovanhide
2016-09-17 18:43
Yep, rockdb is a big old dependency :slightly_smiling_face:

donovanhide
2016-09-17 18:43
Did you use homebrew rocksdb?

mart0nix
2016-09-17 18:46
@cbf is this the only available example of the SDK outside of Vagrant?: https://github.com/hyperledger/fabric/blob/master/docs/nodeSDK/sample-web-app.md

cbf
2016-09-17 18:54
@mart0nix ok, getting closer

cbf
2016-09-17 18:54
I had an earlier version of that compose running - I just ran it again with latest build

cbf
2016-09-17 18:54
now just need to fix what’s wrong with the published document

cbf
2016-09-17 18:55
@mart0nix you can run that sample in or outside vagrant (once I get it working)

mart0nix
2016-09-17 18:56
awesome

mart0nix
2016-09-17 18:56


cbf
2016-09-17 23:02
I pushed the fixes to my personal repo

cbf
2016-09-17 23:03
you can clone and build from there

cbf
2016-09-17 23:03
LMK if you have any issues/questions

grapebaba
2016-09-18 09:24
Hey, blockchain service on bluemix cannot be created

grapebaba
2016-09-18 09:26

tcnthomas
2016-09-18 10:18
Just try to create the blockchain service again tomorrow or in half a day. Once you have it created don’t throw it away (like I did) otherwise you might again risk of not being able to create it for a while.

mart0nix
2016-09-18 10:49
after spending a month with Bluemix I'd suggest people look into local deployment options

mart0nix
2016-09-18 10:49
until it gets more production ready

mart0nix
2016-09-18 11:03
@cbf I pulled the repo but I get the following error when I do docker-compose up

mart0nix
2016-09-18 11:03
Pulling repository http://docker.io/library/fabric-sdk ERROR: Error: image library/fabric-sdk:latest not found

mart0nix
2016-09-18 11:05
may be the image should be set to image: hyperledger/fabric-sdk (instead of just fabric-sdk)

cbf
2016-09-18 11:05
you need to build the docker image first

cbf
2016-09-18 11:05
docker build -t fabric-sdk:latest .

cbf
2016-09-18 11:08
ok, just checked - (need more coffee;-) you just need to build the docker image first as noted above

cbf
2016-09-18 11:09
@mart0nix ^^

mart0nix
2016-09-18 11:13
I tried building it but it failed at the end

mart0nix
2016-09-18 11:13
Step 6 : RUN cp $GOPATH/src/github.com/hyperledger/fabric/examples/sdk/node/* . ---> Running in 03f350dd609b cp: cannot stat '/opt/gopath/src/github.com/hyperledger/fabric/examples/sdk/node/*': No such file or directory The command '/bin/sh -c cp $GOPATH/src/github.com/hyperledger/fabric/examples/sdk/node/* .' returned a non-zero code: 1

mart0nix
2016-09-18 11:14
it looks like the GOPATH var has been messed up

mart0nix
2016-09-18 11:14
MARTINs-MacBook-Pro:node_sdk martinmateev$ set |grep GOPATH GOPATH=/Users/martinmateev/work

mart0nix
2016-09-18 11:16
@cbf I see that /opt/gopath is using in the docker-compose file as well - but why would the docker build fail ???

garisingh
2016-09-18 11:18
I just built in on my Mac with no issues

garisingh
2016-09-18 11:18
perhaps you need to cleanup your fabric images?

grapebaba
2016-09-18 11:19
@mart0nix: usUally i use loCal, but i need do a demo for customer using blUemix

garisingh
2016-09-18 11:19
you might want to do a `docker pull hyperledger/fabric-peer:latest`

garisingh
2016-09-18 11:20
@grapebaba - team is working on adding more networks for BMX so stay tuned on that front

mart0nix
2016-09-18 11:33
@garisingh where is that hardcoded GOPATH /opt/gopath/ coming from in the docker build process ?

mart0nix
2016-09-18 11:36
@cbf any idea on the Step 7 : RUN cp $GOPATH/src/github.com/hyperledger/fabric/examples/sdk/node/* . ---> Running in de2cc651d065 cp: cannot stat '/opt/gopath/src/github.com/hyperledger/fabric/examples/sdk/node/*': No such file or directory

garisingh
2016-09-18 11:38
it will be the GOPATH set inside the container

garisingh
2016-09-18 11:38
in this case, your base image is `hyperledger/fabric-peer:latest`

garisingh
2016-09-18 11:40
try this: `docker run --rm -it hyperledger/fabric-peer /bin/bash`

mart0nix
2016-09-18 11:41
ok that worked

garisingh
2016-09-18 11:42
`ls $GOPATH/src/github.com/hyperledger/fabric/examples/sdk/node`

mart0nix
2016-09-18 11:42
ls: cannot access /opt/gopath/src/github.com/hyperledger/fabric/examples/sdk/node: No such file or directory

mart0nix
2016-09-18 11:42
aha I didn't realize Docker will have its own GOPATH var

garisingh
2016-09-18 11:43
fabric-peer sets GOPATH

garisingh
2016-09-18 11:43
so I think you just need to pull down an updated fabric-peer image

garisingh
2016-09-18 11:43
`docker pull hyperledger/fabric-peer:latest`

mart0nix
2016-09-18 11:43
well I already have the latest fabric-peer image

mart0nix
2016-09-18 11:44
wouldn't it make more sense to set my own GOPATH inside Docker ?

garisingh
2016-09-18 11:45
``` Garis-MacBook-Pro:~ gsingh$ docker run --rm -it hyperledger/fabric-peer /bin/bash root@49f290c16fd7:/opt/gopath/src/github.com/hyperledger/fabric# root@49f290c16fd7:/opt/gopath/src/github.com/hyperledger/fabric# root@49f290c16fd7:/opt/gopath/src/github.com/hyperledger/fabric# root@49f290c16fd7:/opt/gopath/src/github.com/hyperledger/fabric# echo $GOPATH /opt/gopath root@49f290c16fd7:/opt/gopath/src/github.com/hyperledger/fabric# ls $GOPATH/src/github.com/hyperledger/fabric/examples/sdk/node/ standalone-app.js web-app.js root@49f290c16fd7:/opt/gopath/src/github.com/hyperledger/fabric# ```

garisingh
2016-09-18 11:45
so my fabric-peer has the `$GOPATH/src/github.com/hyperledger/fabric/examples/sdk/node/` directory

garisingh
2016-09-18 11:46
and it seems yours does not?

mart0nix
2016-09-18 11:47
ok let me try that then

donovanhide
2016-09-18 12:27
Does the `peer` binary running in this image: https://hub.docker.com/r/hyperledger/fabric-peer/ actually require any of the files in gopath/src/github.com/hyperledger/fabric to operate? I know it is quite convoluted, but previously I’ve use docker images to create binaries and then delete all the source directory files and build tools. Makes for compact docker images and ensures that all configuration is passed through the docker or kubernetes config methods.

donovanhide
2016-09-18 12:28
My aim is to have a repeatable workflow for bringing up a group of validators for internal testing, running on Google Cloud.

garisingh
2016-09-18 12:37
@donovanhide - for running the peer and membersrvc processes in Docker containers you should not actually need the fabric source or the Go compiler in those images. The one caveat with the peer is that if you want to support deploying chaincode via the REST API and using remote Git repositories, then you would need the Go compiler and further if you did not vendor the fabric shim with your chaincode in that remote repo you'd also need the fabric source

garisingh
2016-09-18 12:38
BUT - if you are willing to stick with deploying chaincode from your local filesystem using the NodeSDK, then you could have a pretty minimal peer image

garisingh
2016-09-18 12:40
so I've basically built binary peer and rocksdb and then just copied into base alpine image

garisingh
2016-09-18 12:41
makes for a nice compact image

garisingh
2016-09-18 12:41
(well I did it a while back - have not update in a while)

donovanhide
2016-09-18 12:41
Yes, we’d want to compile all chaincode locally first during the testing phase. Would also like to remove the dependency for any node.js if possible. In an ideal world we’d also have a local `chaincode` tool written in Go that does the deploy, invoke and query functions that we can use in our dev workflow, which lacks the rocksdb dependency.

donovanhide
2016-09-18 12:42
Do you still have a Dockerfile for that minimal alpine image you made?

donovanhide
2016-09-18 12:44
Our basic use case at the moment is just to allow developers, using just Docker for Mac and Go to play around with an internal fabric environment running on Google Cloud. It gets complicated getting people to learn a bit of node.js and vagrant as well :slightly_smiling_face:


garisingh
2016-09-18 12:50
I was a bit lazy in that I never added in actually building the binaries into this workflow, but basically the stuff in `bin` and `lib` just came from copying the binaries from the host system. Just need to make sure to build rocksdb with the portable flag

garisingh
2016-09-18 12:50
but I think you'll get the idea.

donovanhide
2016-09-18 12:51
Thanks that looks like a good starting point, much appreciated. I’ll share any Dockerfile that I get working!

garisingh
2016-09-18 12:51
cool

arvin
2016-09-18 14:55
I use POST ip:7050/registrar login jim .How can I login out by POST command.

cbf
2016-09-18 15:01
there’s no logout yet

arvin
2016-09-18 15:05
@cbf If one host login with jim ,the other can't login with jim ,is that right?

cbf
2016-09-18 15:10
I believe that is the case @arvin

cbf
2016-09-18 15:10
@garisingh would know for certain

arvin
2016-09-18 15:11
@cbf

arvin
2016-09-18 15:11
@cbf Thank you

arvin
2016-09-18 15:26
The log: vp0_1 | 14:21:27.416 [rest] processChaincodeDeploy -> ERRO 03c Chaincode name may not be blank in development mode. vp0_1 | 14:21:27.416 [rest] ProcessChaincode -> INFO 03d REST successfully deploy chaincode: {"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params","data":"Chaincode name may not be blank in development mode."},"id":1} When I deploy example02 with POST ip:7050/chaincode ,I get that log.

donovanhide
2016-09-18 15:28
Have just been reading through the consensus docs, specifically the endorsement stage : https://github.com/hyperledger/fabric/blob/master/proposals/r1/Next-Consensus-Architecture-Proposal.md#23-an-endorser-receives-and-endorses-a-transaction Given that the transaction simulation stage runs on both the submitting peer and the endorsing peers and transactions are not broadcast as a batch, I’m wondering how this design will deal with highly contended keys in the value store. For example, say the ledger is used by the chaincode to hold an orderbook, with offers constantly changing at high frequency. It is likely that clients will be submitting to different peers at around the same time transactions that will modify the tip of the orderbook. My reading of the design document is that this will frequently lead to the `STALE_VERSION` endorsement being returned. Ripple’s approach to this issue is to group a set of transactions into a batch which are processed in a hard to predict determinisitc order and loose time constraints dictate which transactions get into which batch. I’d be very interested to hear any views on this potential issue :slightly_smiling_face:

donovanhide
2016-09-18 15:30

arvin
2016-09-18 15:31
When I use 1Host with 4 docker container it will be success. I changed deploy on 4Host by docker container ,when I deploy example02 with POST vp0:7050/chaincode ,I get that log.(core.yml mode is net)

arvin
2016-09-18 16:13
I deployed on 4Host by docker container: I go into VP0 :peer chaincode deploy -u jim -p http://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Function":"init", "Args": ["a","100", "b", "200"]}' The log: 16:09:50.176 [chaincodeCmd] getChaincodeSpecification -> INFO 001 Local user 'jim' is already logged in. Retrieving login token. 16:09:50.362 [chaincodeCmd] chaincodeDeploy -> INFO 002 Deploy result: type:GOLANG chaincodeID:<path:"github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02" > ctorMsg:<args:"init" args:"a" args:"100" args:"b" args:"200" > 16:09:50.362 [main] main -> INFO 003 Exiting..... VPO log: vp0_1 | 16:09:51.344 [chaincode] Launch -> ERRO 0a5 sending init failed(handler not found for chaincode ) vp0_1 | 16:09:51.344 [chaincode] Launch -> ERRO 0a6 stop failed chaincode name not set(Failed to init chaincode(handler not found for chaincode )) @baohua @cbf

mart0nix
2016-09-18 16:15
@garisingh downloading the latest image helped !!! Thanks

arvin
2016-09-18 16:17
@mart0nix How to get the latest image with vagrant?I try vagrant box update it does't work

mart0nix
2016-09-18 16:18
@arvin I haven't tried the vagrant option yet

mart0nix
2016-09-18 16:18
I'm doing the docker route on a Mac

mart0nix
2016-09-18 16:19
docker pull hyperledger/fabric-peer:latest

mart0nix
2016-09-18 16:19
is what worked for me

arvin
2016-09-18 16:23
@mart0nix THX!by the way, What is the difference of fabric-peer and fabric-baseimages?

mart0nix
2016-09-18 16:27
I'm not sure what the fabric-baseimages are

mart0nix
2016-09-18 16:27
in general there are 3 images you need before you do a full stack development

mart0nix
2016-09-18 16:27
peer which is the node for a lack of a better word

mart0nix
2016-09-18 16:28
the membersrv which is like 3rd party services like certificates

mart0nix
2016-09-18 16:28
and the nodesdk which is the SDK that will let you actually write an app that communicates with a chaincode

mart0nix
2016-09-18 16:31

mart0nix
2016-09-18 16:32
up until "node app"

cbf
2016-09-18 16:32
and then?

mart0nix
2016-09-18 16:33
deploy complete; results: {"uuid":"mycc","chaincodeID":"mycc"} querying chaincode ... Failed to query chaincode: request={"chaincodeID":"mycc","fcn":"query","args":["a"]}, error=%k { error: { status: 'FAILURE', msg: <Buffer 45 72 72 6f 72 3a 46 61 69 6c 65 64 20 74 6f 20 6c 61 75 6e 63 68 20 63 68 61 69 6e 63 6f 64 65 20 73 70 65 63 28 43 6f 75 6c 64 20 6e 6f 74 20 67 65 ... > }, msg: 'Error:Failed to launch chaincode spec(Could not get deployment transaction for mycc - LedgerError - ResourceNotFound: ledger: resource not found)' }

cbf
2016-09-18 16:34
could you share the full logs please?

mart0nix
2016-09-18 16:34
sure one sec

mart0nix
2016-09-18 16:39
@cbf: Attaching to membersrvc, peer, nodesdk peer | 16:38:02.137 [sysccapi] RegisterSysCC -> WARN 001 Currently system chaincode does support security(noop,http://github.com/hyperledger/fabric/bddtests/syschaincode/noop) peer | 2016/09/18 16:38:36 transport: http2Server.HandleStreams failed to receive the preface from client: read tcp 172.17.0.4:7051->172.17.0.5:39348: read: connection reset by peer peer | 16:38:37.817 [chaincode] Launch -> ERRO 002 sending init failed(handler not found for chaincode mycc) ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information. If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).

mart0nix
2016-09-18 16:39
"handler not found for chaincode mycc"

mart0nix
2016-09-18 16:39
looks like this is the real issue

adeelqureshi
2016-09-18 16:41
I imagine this is due to the interface change that my local Go Compiler isn't happy with What is the work around to still make that change and deploy this code on my local network ?

mart0nix
2016-09-18 16:42
MARTINs-MacBook-Pro:node_sdk martinmateev$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b8a6252de57b fabric-sdk "bash" 4 minutes ago Up 4 minutes nodesdk f010c13ae5e8 hyperledger/fabric-peer "sh -c 'sleep 20; pee" 4 minutes ago Up 4 minutes 0.0.0.0:7050-7051->7050-7051/tcp, 0.0.0.0:7053->7053/tcp peer 42a0cd3fb867 hyperledger/fabric-membersrvc "membersrvc" 4 minutes ago Up 4 minutes 0.0.0.0:7054->7054/tcp membersrvc ffad8a8cba27 2bccd9bde9d9 "/bin/bash" 5 hours ago Up 5 hours cocky_kalam

mart0nix
2016-09-18 16:42
@cbf I'm not sure why I get that: ttp2Server.HandleStreams failed to receive the preface from client: read tcp 172.17.0.4:7051->172.17.0.5:39348: read: connection reset by peer

mart0nix
2016-09-18 16:43
this sounds like some kind of a routing/mapping issue

cbf
2016-09-18 16:48
you are running this inside vagrant? @mart0nix

mart0nix
2016-09-18 16:48
no

cbf
2016-09-18 16:49
you are on docker 1.12.1?

cbf
2016-09-18 16:49
mac, windows or linux

cbf
2016-09-18 16:49
ah mac

mart0nix
2016-09-18 16:49
Version 1.12.1-beta26.1 (build: 12100)

mart0nix
2016-09-18 16:49
Mac

mart0nix
2016-09-18 16:49
btw: I'm looking at the docker compose

mart0nix
2016-09-18 16:49
under nodesdk:

mart0nix
2016-09-18 16:49
command: bash #command: sh -c "sleep 50; CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=peer:7051 ./chaincode_example02"

mart0nix
2016-09-18 16:50
shouldn't I comment out the second line ?

cbf
2016-09-18 16:50
should be one line

mart0nix
2016-09-18 16:50
yeah I mean swap them

mart0nix
2016-09-18 16:51
comment the first one and comment out the second

cbf
2016-09-18 16:52
ok, I see - yes, the chaincode was not deployed

cbf
2016-09-18 16:53
you can do that a couple of ways

cbf
2016-09-18 16:53
you can swap the bash for the commented command line

mart0nix
2016-09-18 16:53
root@2291130b726d:/opt/gopath/src/chaincode_example02# node app $DEPLOY_MODE: dev enrolling user admin ... deploying chaincode; please wait ... deploy complete; results: {"uuid":"mycc","chaincodeID":"mycc"} querying chaincode ... query completed successfully; results={"result":{"type":"Buffer","data":[49,48,48]}}

mart0nix
2016-09-18 16:53
looks like that solved the problem

mart0nix
2016-09-18 16:54
however in my docker logs I still see the following line:

mart0nix
2016-09-18 16:54
peer | 2016/09/18 16:53:07 transport: http2Server.HandleStreams failed to receive the preface from client: read tcp 172.17.0.3:7051->172.17.0.4:43798: read: connection reset by peer

cbf
2016-09-18 16:54
will update

mart0nix
2016-09-18 16:54
it looks like the chaincode went through though

cbf
2016-09-18 16:57
sorry for the hassle… I have a patch in review that addresses this in fabric and will deploy new official images for v0.6

cbf
2016-09-18 16:57
thanks for your perseverence

mart0nix
2016-09-18 16:59
hey no worries

mart0nix
2016-09-18 16:59
I'm glad to help out

mart0nix
2016-09-18 17:00
another issue is that the whole container situation is crashing after a minute or two

mart0nix
2016-09-18 17:00
(without starting the node app)

mart0nix
2016-09-18 17:00
MARTINs-MacBook-Pro:node_sdk martinmateev$ docker-compose up Creating membersrvc Creating peer Creating nodesdk Attaching to membersrvc, peer, nodesdk peer | 16:58:06.281 [sysccapi] RegisterSysCC -> WARN 001 Currently system chaincode does support security(noop,http://github.com/hyperledger/fabric/bddtests/syschaincode/noop) nodesdk | 16:58:36.472 [shim] DEBU : Peer address: peer:7051 nodesdk | 16:58:36.476 [shim] DEBU : os.Args returns: [./chaincode_example02] nodesdk | 16:58:36.480 [shim] DEBU : Registering.. sending REGISTER nodesdk | 16:58:36.482 [shim] DEBU : []Received message REGISTERED from shim nodesdk | 16:58:36.482 [shim] DEBU : []Handling ChaincodeMessage of type: REGISTERED(state:created) nodesdk | 16:58:36.482 [shim] DEBU : Received REGISTERED, ready for invocations ERROR: An HTTP request took too long to complete. Retry with --verbose to obtain debug information. If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).

mart0nix
2016-09-18 17:03
ok it looks like nodesdk was updated and now I 'm getting this:

mart0nix
2016-09-18 17:03
peer | 17:02:08.346 [chaincode] processStream -> ERRO 002 Error handling chaincode support stream: stream error: code = 1 desc = "context canceled"

mart0nix
2016-09-18 17:03
I guess I will just hold on : ))

cbf
2016-09-18 17:37
sigh

mart0nix
2016-09-18 17:46
well

mart0nix
2016-09-18 17:46
it's actually working

mart0nix
2016-09-18 17:52
@cbf thanks for all the help !!!

donovanhide
2016-09-18 19:22
There’s some gnarly hard-coded paths that don’t play well with minimal docker images: https://github.com/hyperledger/fabric/blob/master/consensus/pbft/pbft.go#L80

garisingh
2016-09-18 19:25
@donovanhide - that's actually OK - if you notice that's just one of the entries appended to the of places to search for the config file

garisingh
2016-09-18 19:26
if you notice in the Dockerfile I pinged you, I actually store those configs at `../consensus` relative to the bin directory

garisingh
2016-09-18 19:27
you can also keep the config files in the same dir as the binaries

donovanhide
2016-09-18 19:28
Yep, fair enough, just running into all the config files one by one :slightly_smiling_face: Trying to also achieve minimal Dockerfile length as well :slightly_smiling_face: ```# minimal fabric FROM golang:alpine RUN apk add --virtual .build-dependencies git g++ RUN apk add rocksdb-dev --update-cache --repository http://nl.alpinelinux.org/alpine/edge/testing RUN go get http://github.com/hyperledger/fabric/peer RUN apk del .build-dependencies ```

donovanhide
2016-09-18 19:28
Who’s the best person to discuss consensus with?

garisingh
2016-09-18 19:30
the #fabric-consensus-dev channel is actively monitored by the folks who wrote consensus

donovanhide
2016-09-18 19:31
cool, thanks :slightly_smiling_face:

abutler
2016-09-18 19:42
has joined #fabric

donovanhide
2016-09-18 19:45
It’s a little bit inconsistent that the config search path for the consensus config yaml files goes up a directory and then down two directories, while the peer config file should be in the same directory as the binary. With kubernetes you’d tend to want to put all config files in /etc/peer/[core.yaml|pbft.yaml|noops.yaml] for example. Would make it easier to map a directory of configuration files per node.

donovanhide
2016-09-18 19:49
https://github.com/hyperledger/fabric/blob/master/consensus/pbft/pbft.go#L73 If this was `config.SetConfigName(“pbft”)` and `config.yaml` was renamed `pbft.yaml`, and the same for noops, it would be more flexible. Otherwise, you can’t have all the config files in one directory.

arvin
2016-09-19 07:24
is there someway i can deployed on 4 Host

grapebaba
2016-09-19 10:26
@garisingh: i got an ibm_db issue when deploy an B2BPOC demo

grapebaba
2016-09-19 10:27
i guess maybe BMX node version is high

mart0nix
2016-09-19 13:00
is there an old school way of building a hyperledger environment? like downloading and compiling the different pieces instead of working with docker and vagrant ?

ghaskins
2016-09-19 13:03
@mart0nix: short answer: yes

ghaskins
2016-09-19 13:03
Long answer: you always need docker as this is what the peer uses for chaincode

mart0nix
2016-09-19 13:05
well the peer is a stand-alone piece of software

mart0nix
2016-09-19 13:05
and the chaincode gets sent to the network

mart0nix
2016-09-19 13:05
what's the need for docker ?

mart0nix
2016-09-19 13:06
@ghaskins I may be missing something : ))

ghaskins
2016-09-19 13:07
Hold on, kid potty emergency

ghaskins
2016-09-19 13:12
@mart0nix: chaincode is compiled and executed in a docker container

ghaskins
2016-09-19 13:12
The peer drives the docker API

mart0nix
2016-09-19 13:13
I see

mart0nix
2016-09-19 13:15

mart0nix
2016-09-19 13:16
could that be a local path or it needs to be a github repo ?

mart0nix
2016-09-19 13:16
I'm looking at the node app

ghaskins
2016-09-19 13:16
but if you want to create an environment similar to what the official devenv uses you can start with a base 14.04 image and run the following scripts



ghaskins
2016-09-19 13:18
this also works (with minor adjustments) for 16.04

ghaskins
2016-09-19 13:18
(the official image uses 14.04 currently, though we hope to upgrade this ASAP)

mart0nix
2016-09-19 13:19
got it

mart0nix
2016-09-19 13:19
thanks!

ghaskins
2016-09-19 13:19
np

mart0nix
2016-09-19 13:44
@ghaskins btw do you know where I can find output from the chaincode

mart0nix
2016-09-19 13:44
fmt.Printf("Aval = %d, Bval = %d\n", Aval, Bval)

mart0nix
2016-09-19 13:44
where would that show up ? : ))

ghaskins
2016-09-19 13:44
otp

mart0nix
2016-09-19 13:45
output ?

ghaskins
2016-09-19 13:45
on the phone

mart0nix
2016-09-19 13:45
oh ok : ))

ghaskins
2016-09-19 13:45
sorry, answer in a bit

mart0nix
2016-09-19 13:45
no worries

mart0nix
2016-09-19 13:46
ok so if anyone else can answer the logging questions

mart0nix
2016-09-19 13:47
basically where does the output from the fmt goes

mart0nix
2016-09-19 13:47
as well as the logging provided by the shim logger

cbf
2016-09-19 13:54
logging goes to stdout and stderr - it can be configured to write to syslog etc, if I am not mistaken

cbf
2016-09-19 13:55
the fmt statements I believe write to stdout unless they are creating an error

ghaskins
2016-09-19 13:56
back

cbf
2016-09-19 13:56
there are discussion threads on rethinking error handling and logging in slack and elsewhere

ghaskins
2016-09-19 13:56
i know that from the perspective of chaincode itself…it just does pure stdout/stderr printing as @cbf mentioned…when you run in devmode, this is exactly what you see

ghaskins
2016-09-19 13:57
when in netdeploy mode, I am not sure where the stdout is routed to

ghaskins
2016-09-19 13:57
@muralisr might know

cbf
2016-09-19 13:57
@garisingh might share what he has done for Bluemix

cbf
2016-09-19 13:58
I believe he is rotating logs presently… not sure that he is pulling them off or not

mart0nix
2016-09-19 14:01
so I'm running @cbf example of a self-contained node app (which is using this chaincode: https://github.com/hyperledger/fabric/blob/master/examples/chaincode/go/chaincode_example02/chaincode_example02.go)

mart0nix
2016-09-19 14:01
I see line 119: fmt.Printf("Aval = %d, Bval = %d\n", Aval, Bval)

mart0nix
2016-09-19 14:01
I can't figure out where would that get logged to

mart0nix
2016-09-19 14:02
the SDK deploys the chaincode so it's unclear where is the stdout/stderr from that point on : ))

ghaskins
2016-09-19 14:04
@mart0nix it relates to what I was talking about earlier: the peer(s) will compile/launch the submitted code inside a docker container

ghaskins
2016-09-19 14:04
so “stdout” would be w.r.t. that docker container running on each peer

ghaskins
2016-09-19 14:05
when you perform a standard deployment (vs a devmode deployment) the peer is going to manage where it maps that containers stdout

mart0nix
2016-09-19 14:05
well that's what I thought too

ghaskins
2016-09-19 14:05
via a mechanism I am not familiar with

mart0nix
2016-09-19 14:05
but I'm looing at docker logs -f peer

mart0nix
2016-09-19 14:05
and I can't find any output from the chaincode there

mart0nix
2016-09-19 14:05
I'm set at DEBUG level

ghaskins
2016-09-19 14:06
@muralisr is really the one who would know for sure

ghaskins
2016-09-19 14:06
do note that this wouldnt be the peer container though

ghaskins
2016-09-19 14:06
the chaincode instances each have their own

muralisr
2016-09-19 14:09
@ghaskins _so “stdout” would be w.r.t. that docker container running on each peer_ that’s correct for the chaincode container

muralisr
2016-09-19 14:10
(if I understood you correctly)

mart0nix
2016-09-19 14:12
well I'm running 3 containers - peer, membersrv and nodesdk

muralisr
2016-09-19 14:12
and when the peer starts a chaincode, its going to run in a container. The stdout for that container will contain the chaincode logs

ghaskins
2016-09-19 14:12
@muralisr yes, i think that is what @mart0nix is asking about

ghaskins
2016-09-19 14:13
im not clear what, if anything, we do with stdout as I always run devmode

mart0nix
2016-09-19 14:13
@muralisr so docker logs -f peer

mart0nix
2016-09-19 14:13
should show me output from the chaincode itself ?

muralisr
2016-09-19 14:15
@mart0nix I do `docker ps` to get my <cc container id> and then do `docker logs <cc container id>`

ghaskins
2016-09-19 14:16
@muralisr if we dont already have it, or have plans for it, we should probably create a JIRA to add a feature to allow the chaincode logs to be aggregated as part of the UX

mart0nix
2016-09-19 14:17
@muralisr that's what I thought but I don't see the output from the chaincode there : ))

mart0nix
2016-09-19 14:18
may be I'm missing something - I will give it another try

mart0nix
2016-09-19 14:18
at least I know where to look for it : ))

mart0nix
2016-09-19 14:18
@ghaskins that would be awesome

mart0nix
2016-09-19 14:19
from a beginner's perspective, being able to log and debug is very useful

ghaskins
2016-09-19 14:19
@mart0nix could you write one up?

ghaskins
2016-09-19 14:19
doesnt have to be elaborate, just so we have a placeholder minimally

ghaskins
2016-09-19 14:20
but should proabably wait to hear from @muralisr as for all I know there are plans in the works

mart0nix
2016-09-19 14:20
@ghaskins I'm not a great programmer, I'm more of a hacker : ((

ghaskins
2016-09-19 14:21
I just meant the JIRA

mart0nix
2016-09-19 14:21
oh I see - I thought you mean If I could write a logging module or something : ))

ghaskins
2016-09-19 14:21
if you wanted to, thats great and would be welcome…but I was just referring to getting something into JIRA so we dont lose it

mart0nix
2016-09-19 14:22
oh that would be great

mart0nix
2016-09-19 14:22
what's the JIRA link

ghaskins
2016-09-19 14:22

ghaskins
2016-09-19 14:22
under FAB

mart0nix
2016-09-19 14:22
ok

mart0nix
2016-09-19 14:22
well I found a logging tab in Bluemix

mart0nix
2016-09-19 14:23
but it's not very functional for some reason (it's rather slow, hard to navigate, etc...)

mart0nix
2016-09-19 14:26

ghaskins
2016-09-19 14:26
Personally I think the chaincode logging needs to be a first-class exposed feature of the fabric itself

mart0nix
2016-09-19 14:32
well the shim ChaincodeLogger is a great idea

mart0nix
2016-09-19 14:33
it needs a few different log handlers so you can put logs in syslog, queues, 3rd party aggregators, etc...

mart0nix
2016-09-19 14:33
it could also be used for monitoring and alerting

mart0nix
2016-09-19 14:33
for level WARN and ERR

mart0nix
2016-09-19 14:35
you set the logging levels for the different environments (production, development, staging, etc...) and it's all tip top

cbf
2016-09-19 14:35
@ghaskins someone tried a patchset for that but it was a bit entangled so I think it is undergoing a rethink

ghaskins
2016-09-19 14:35
@cbf ah, cool, glad its being worked on at least

cbf
2016-09-19 14:35
some of us were also looking at 3rd party log packages

cbf
2016-09-19 14:36
the config (viper) and standard go-logging are somewhat inadequate

ghaskins
2016-09-19 14:36
if there is some kind of jira/thread for this conversation you could point @mart0nix at, please let him know.


ghaskins
2016-09-19 14:38
ty


mart0nix
2016-09-19 14:41
awesome - I will look around Jira and see if I can be of any help

mart0nix
2016-09-19 15:03
on a different note

mart0nix
2016-09-19 15:03
can anyone enlighten me how to load a local chaincode via the SDK

mart0nix
2016-09-19 15:03

mart0nix
2016-09-19 15:04
could that be a local chaincode or it can fetch it from github ?

muralisr
2016-09-19 15:20
@mart0nix since `http://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02` will resolve to the chaincode GO package on the peer filesystem, that path cannot be downloaded from the network… however `deployRequest.chaincodePath = “https://github.com/mart0nix/fabric/examples/chaincode/go/chaincode_example02` can

mart0nix
2016-09-19 15:21
@muralisr got it. Thanks!

muralisr
2016-09-19 15:21
sure thing!

mart0nix
2016-09-19 15:28
@muralisr for some reason I still can't get any chaincode log records to show in the peer logs

mart0nix
2016-09-19 15:30
I have this record in func (t *SimpleChaincode) Init..........

mart0nix
2016-09-19 15:30
http://logger.Info("going through init")

mart0nix
2016-09-19 15:30
logger.SetLevel(shim.LogInfo) in main()

mart0nix
2016-09-19 15:30
it looks like the chaincode is deployed successfully and yet not log record is being produced

mart0nix
2016-09-19 15:31
I must be missing something huge here

muralisr
2016-09-19 15:33
@mar0

muralisr
2016-09-19 15:33
oops :slightly_smiling_face:

muralisr
2016-09-19 15:34
@mart0nix _I still can't get any chaincode log records to show in the peer logs_ - they won’t show up in the peer logs

muralisr
2016-09-19 15:36
(maybe I misunderstood the above) … if you do docker ps, you should should see peer and chaincode containers. I’d expect the chaincode container to contain the logs

mart0nix
2016-09-19 15:37
@muralisr I have 3 containers: peer, membersrv and nodesdk

mart0nix
2016-09-19 15:37
I'm deploying via the SDK

mart0nix
2016-09-19 15:37
the nodesdk container doesn't have ANY logs in it

mart0nix
2016-09-19 15:38
logging level is set to debug in the docker-compose file

mart0nix
2016-09-19 15:39
```nodesdk: container_name: nodesdk image: fabric-sdk volumes: - ~/dev/mytest:/opt/gopath/src/mytest environment: - MEMBERSRVC_ADDRESS=membersrvc:7054 - CORE_LOGGING_LEVEL=DEBUG - PEER_ADDRESS=peer:7051 - KEY_VALUE_STORE=/tmp/hl_sdk_node_key_value_store - NODE_PATH=/usr/local/lib/node_modules # set to following to 'dev' if peer running id Developer mode - DEPLOY_MODE=dev command: bash #command: sh -c "sleep 50; CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=peer:7051 ./chaincode_example02" stdin_open: true tty: true links: - membersrvc - peer```

muralisr
2016-09-19 15:39
ok

muralisr
2016-09-19 15:40
after you do deploy can you show `docker ps`

mart0nix
2016-09-19 15:41
still those three containers

mart0nix
2016-09-19 15:41
same deal if I deploy on the command line

mart0nix
2016-09-19 15:41
```root@c10d7f426350:/opt/gopath/src/chaincode_example02# CORE_CHAINCODE_ID_NAME=sharo CORE_PEER_ADDRESS=peer:7051 ./chaincode_example02 15:38:49.839 [shim] DEBU : Peer address: peer:7051 15:38:49.843 [shim] DEBU : os.Args returns: [./chaincode_example02] 15:38:49.846 [shim] DEBU : Registering.. sending REGISTER 15:38:49.849 [shim] DEBU : []Received message REGISTERED from shim 15:38:49.850 [shim] DEBU : []Handling ChaincodeMessage of type: REGISTERED(state:created) 15:38:49.850 [shim] DEBU : Received REGISTERED, ready for invocations ```

mart0nix
2016-09-19 15:43

mart0nix
2016-09-19 15:44
the only thing I did was to add the shim.NewLogger()

muralisr
2016-09-19 15:49
If you are not deploying from command line, I’d expect to see a chaincode container started by the peer

mart0nix
2016-09-19 15:55
aah may be the node app does create a container but it quickly exists

cbf
2016-09-19 15:55
@mart0nix on the question of chaincode and sdk, presently it needs to be local. There is work on adding git

mart0nix
2016-09-19 15:55
so I'm not able to see new container because it comes and goes quickly

mart0nix
2016-09-19 15:56
@cbf got it

mart0nix
2016-09-19 15:56
I will start a run loop and see if things change

mart0nix
2016-09-19 15:57
but the bottom line is that a chaincode will always run in a new container that I should be able to see with docker ps

mart0nix
2016-09-19 15:57
correct ?

cbf
2016-09-19 15:59
@mart0nix it shouldn’t disappear

cbf
2016-09-19 15:59
so, if you are running my sample, the chaincode is the nodeSDK container

cbf
2016-09-19 16:00
if you ran docker-compose -d, then you can see the chaincode logs with:

cbf
2016-09-19 16:00
docker logs nodeSDK

cbf
2016-09-19 16:00
the sample I shared is running in -chaincode-dev mode

cbf
2016-09-19 16:01
in this mode, we start the chaincode directly and it connects to the peer

cbf
2016-09-19 16:01
in normal operations, you would not no this

cbf
2016-09-19 16:01
recall that I had the command for the nodeSDK containeer as ‘bash’ at one point?

cbf
2016-09-19 16:01
try doing that

cbf
2016-09-19 16:02
then, after you docker exec into the nodeSDK container, start the chaincode_example02 using the same command as in the docker-compose now - run in the background so that you can then run the node app

cbf
2016-09-19 16:03
alternately, you can run the runme.sh script and it will do all that for you

mart0nix
2016-09-19 16:31
@cbf got it - let me try doing that

mart0nix
2016-09-19 17:28
@cbf it worked as expected

mart0nix
2016-09-19 17:29
the logs are now showing up when I started the chaincode on the command line

mart0nix
2016-09-19 17:29
my mistake was that I was trying to deploy the chaincode first via the docker-compose file and then via the SDK itself

mart0nix
2016-09-19 18:15
awesome stuff @cbf @muralisr @ghaskins thanks for all the help - I'm able to do chaincode development now !!!

cbf
2016-09-19 18:15
woo hoo!

mart0nix
2016-09-19 18:16
GO looks god-sent after ...Solidity

mart0nix
2016-09-19 18:16
:wink:

jonathanlevi
2016-09-19 21:40
Hey, "Go looks god-sent." (Regardless, that is ;-))

jonathanlevi
2016-09-19 21:41
BTW: I still think that one day things will meet in the middle. The super permissive will be better/more tightly controlled, and at the same time the super-strict, will have pre-agreed upon extensions (or one might call them, exceptions)

cbf
2016-09-19 23:36
The java chaincode is just about ready... the team have asked for time on the agenda to review and demo. I'm sure the team would love feedback

joseph
2016-09-20 04:16
Hi All,

joseph
2016-09-20 04:16
I have a question.

joseph
2016-09-20 04:40
Is it possible to run a memberservices on one host and fabric-peers on another hosts without Swarm or Kubernetes or so on?

arvin
2016-09-20 14:39
@cbf i have run fabirc on one pc run 4vp and 4chain container ,i deploy example02,i have try to do some invoke.but the chain height not equal. [root@vp4 ~]# curl 172.17.0.5:7050/chain {"height":34634,"currentBlockHash":"c4XlrndMpfkwYEGFxe47rt/l3IFVSjA9Msxq1siGfmLhV/MFg3ZJc5+dZE3itjvGlw78FoYBUeNY/8spizO9rQ==","previousBlockHash":"PvsFuCx/hOxB9FzOmGH/xO5cjd068/mF3Wd6wnaicaf4OG1iJ7TB1JowwtwkkpFAGTxUN7KnFw1fdcLFgpOL5w=="} [root@vp4 ~]# curl 172.17.0.4:7050/chain {"height":34618,"currentBlockHash":"kahGk6VnIUfTpwhCtfcEKN4dMCEu9zQsoJfoBo6btVtVoV+kqlYMQXSWWQcK0IC95b11uqbx8EQLvKJM7RN5CQ==","previousBlockHash":"CcjE4X6PflKhfKlXp+6LtJggJ0gO728TDJvAKzXh5scxC0kX4Rc9YMIp2pzMalaJqd8YLTC9KHLvenGP9HSf4w=="} [root@vp4 ~]# curl 172.17.0.3:7050/chain {"height":34634,"currentBlockHash":"c4XlrndMpfkwYEGFxe47rt/l3IFVSjA9Msxq1siGfmLhV/MFg3ZJc5+dZE3itjvGlw78FoYBUeNY/8spizO9rQ==","previousBlockHash":"PvsFuCx/hOxB9FzOmGH/xO5cjd068/mF3Wd6wnaicaf4OG1iJ7TB1JowwtwkkpFAGTxUN7KnFw1fdcLFgpOL5w=="} [root@vp4 ~]# curl 172.17.0.1:7050/chain {"height":34634,"currentBlockHash":"c4XlrndMpfkwYEGFxe47rt/l3IFVSjA9Msxq1siGfmLhV/MFg3ZJc5+dZE3itjvGlw78FoYBUeNY/8spizO9rQ==","previousBlockHash":"PvsFuCx/hOxB9FzOmGH/xO5cjd068/mF3Wd6wnaicaf4OG1iJ7TB1JowwtwkkpFAGTxUN7KnFw1fdcLFgpOL5w=="} [root@vp4 ~]# curl 0.0.0.0:7050/chain {"height":34634,"currentBlockHash":"c4XlrndMpfkwYEGFxe47rt/l3IFVSjA9Msxq1siGfmLhV/MFg3ZJc5+dZE3itjvGlw78FoYBUeNY/8spizO9rQ==","previousBlockHash":"PvsFuCx/hOxB9FzOmGH/xO5cjd068/mF3Wd6wnaicaf4OG1iJ7TB1JowwtwkkpFAGTxUN7KnFw1fdcLFgpOL5w=="} [root@vp4 ~]#

cbf
2016-09-20 14:48
that is to be expected

cbf
2016-09-20 14:48
each peer is independent

cbf
2016-09-20 14:48
eventually things will be the same if you stop adding txns

cbf
2016-09-20 14:48
but at any given time in a running system things wil not be the same

arvin
2016-09-20 15:01
i hope it will be the same ,but i have stop adding txns for about 4 hours

rafael
2016-09-20 15:24
Hi guys,

rafael
2016-09-20 15:27
Could please tell me about discovery service in the fabric peer-to-peer network?

yacovm
2016-09-20 15:48
what about it?

yacovm
2016-09-20 15:49
you mean the membership service, or the discovery protocol? (Hello messages, etc.)?

mart0nix
2016-09-20 16:58
@jonathanlevi you comment was referring to ...?

mart0nix
2016-09-20 16:59
go vs solidity ?

sukrith
2016-09-20 17:41
is it possible to use NodeSDK on Meteor somehow?

sukrith
2016-09-20 17:43
or does it have to be used with Node.js

david.acton
2016-09-20 17:43
hey gang… I have a question… I have a validating peer 0 (VP0). I deploy chaincode to VP0 and everything works lovely! I create another validating peer (VP1) but when I try and query the chaincode I deployed to VP0 on VP1, it has not replicated. Is this expected behaviour?

david.acton
2016-09-20 17:45
VP0 and VP1 are talking to each other (so it seems in the console of each)

oiakovlev
2016-09-20 17:55
@david.acton are you running in dev mode?

david.acton
2016-09-20 17:55
no

david.acton
2016-09-20 17:55
@oiakovlev no, I’m running in the ‘standard’ mode

ghaskins
2016-09-20 17:57
@sukrith: I think the canonical use case with meteor would be to serve the meteor app to the browser from your nodejs app

ghaskins
2016-09-20 17:57
Or run it coresident in electron

ghaskins
2016-09-20 17:58
But I don't think you can run it I the browser directly

steph_h
2016-09-20 17:58
has joined #fabric

sukrith
2016-09-20 18:03
@ghaskins thanks!

humblealex
2016-09-21 07:06
Hi, all.. I am still struggling trying to build up the environment using vagrant. I followed exactly the instructions in http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Chaincode-setup/#option-1-vagrant-development-environment when I tried make membersrvc && membersrvc I always got the error The command '/bin/sh -c wget https://services.gradle.org/distributions/gradle-2.12-bin.zip -P /tmp --quiet' returned a non-zero code: 4 make: *** [build/image/javaenv/.dummy] Error 4

humblealex
2016-09-21 07:07
could anyone tell me how to resolve that? very much appreciate it.

satheesh
2016-09-21 07:20
@humblealex Looks like it errors out not being able to download gradle from the internet

satheesh
2016-09-21 07:21
Do you have an working internet from inside your vagrant ?

humblealex
2016-09-21 07:31
@satheesh Thanks for your response. I will take a look at it

garisingh
2016-09-21 08:51
@david.acton - sorry for the late response. looks like you were only running 2 peers so you'd be running in NOOPS consensus mode. In this mode, while you technically you can add another peer after the fact, it will actually not receive any of the transactions which were executed on the other peer prior to it connecting. Deploying chaincode is a transaction so the second peer would not have received the deploy and therefore would not have the chaincode deployed

garisingh
2016-09-21 08:53
@joseph - ``` Is it possible to run a memberservices on one host and fabric-peers on another hosts without Swarm or Kubernetes or so on? ```

garisingh
2016-09-21 08:55
this is definitely possible. I'll assume you are running the the peer and member services in Docker containers. The key is that you'll need to make sure you expose the ports on the routable IPs for each node and then you can just wire things together as usual using the IP addresses

arvin
2016-09-21 08:55
@cbf hi, if chaincode docker container down,how can i recorvery it ?

garisingh
2016-09-21 09:03
@arvin - you should only need to run another invoke or query transaction and the peer should create and start the container (if the container is down it basically removes the previous instance and creates and starts a new one)

arvin
2016-09-21 09:05
@garisingh thank you

david.acton
2016-09-21 09:09
@garisingh Hi, thanks for the response!!! You are absolutely correct, I am running two nodes in noops mode. That’s a shame that it doesn’t sync. It makes testing hard. Can you point me to the docs which explains this so I can set up correctly?

hurf
2016-09-21 09:16
has joined #fabric

garisingh
2016-09-21 09:17
@david.acton - if you start the two node first and make sure they connect prior to deploying your chaincode, then things will work in NOOPS mode. But there's no guarantees that nodes in NOOPS mode will stay in sync. For multiple to nodes to stay in sync, you'll want to run PBFT and you would want to run 4 nodes. In the `bddtests` folder you can find some sample docker compose files for getting a 4 peer PBFT network up and running

david.acton
2016-09-21 09:21
@garisingh That’s great to know. I can get the nodes setup. How is one supposed to know this? did I miss some reading?

garisingh
2016-09-21 09:32
I wouldn't say you missed some reading but if you check out http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Network-setup/ and scroll down there's a small section titled consensus which gives a quick explanation of NOOPs but probably not enough about what it really means

thomas.marckx
2016-09-21 11:51
has joined #fabric


chainsaw
2016-09-21 16:07
@garisingh ^^^

tuand
2016-09-21 20:07
fyi for folks working with hyperledger fabric ... https://hyperledgerproject.slack.com/archives/general/p1474487700001089

hhadass
2016-09-21 21:07
has joined #fabric

arvin
2016-09-22 02:04
the command line : pdsh -w ssh:10.210.33.[84,85,111,115] "docker-compose -f /home/gituser/docker-compose-with-membersrvc.yml down" the log:

arvin
2016-09-22 02:04
10.210.33.115: vp3_1 | 10:03:40.694 [peer] handleChat -> ERRO 0e7 Error handling message: Peer FSM cannot handle message (DISC_GET_PEERS) with payload size (0) while in state: created 10.210.33.85: vp1_1 | 02:03:41.439 [peer] handleChat -> ERRO 12b Error handling message: Peer FSM cannot handle message (DISC_GET_PEERS) with payload size (0) while in state: created 10.210.33.85: vp1_1 | 02:03:41.444 [peer] handleChat -> ERRO 12c Error handling message: Peer FSM cannot handle message (DISC_GET_PEERS) with payload size (0) while in state: created 10.210.33.111: vp2_1 | 10:03:32.020 [peer] handleChat -> ERRO 0e7 Error handling message: Peer FSM cannot handle message (DISC_GET_PEERS) with payload size (0) while in state: created

nowhere
2016-09-22 04:38
has joined #fabric

akind
2016-09-22 10:18
has joined #fabric


venkat
2016-09-22 14:08
Thanks for pointer, @cbf - am trying iit out ...

cbf
2016-09-22 14:45
cool

arvin
2016-09-22 14:53
@cbf how much TPS fabric can do currently ,by default parameters

pld
2016-09-22 15:06
has joined #fabric

mart0nix
2016-09-22 16:39
Certificate Handler: "The following interface allows to create transactions and give access to the underlying binding that can be leveraged to link application data to the underlying transaction."

mart0nix
2016-09-22 16:39
what is the meaning of the "underlying binding" and what are examples of it ?

cbf
2016-09-22 17:19
context?

cbf
2016-09-22 17:19
sounds like it could be re-written in english;-)

cbf
2016-09-22 17:20
@arvin IIRC, I have heard figures in the hundreds. The new consensus architecture should up that considerably

jonathanlevi
2016-09-22 17:22
Yes, this could use some (more, much more!) clarification...

jonathanlevi
2016-09-22 17:23
@mart0nix: when people refer to bindings in this context (at least when the initial spec was written) they usually refer to the naming of transactions...

jonathanlevi
2016-09-22 17:24
So that a transaction with a (unique) name can be referred to, e.g. for data to be exchanged...

jonathanlevi
2016-09-22 17:24
Does it make (any, more) sense?

mart0nix
2016-09-22 17:25
@jonathanlevi it does now

mart0nix
2016-09-22 17:25
// In order to enforce access control, we require that the // metadata contains the signature under the signing key corresponding // to the verification key inside certificate of // the payload of the transaction (namely, function name and args) and // the transaction binding (to avoid copying attacks)

mart0nix
2016-09-22 17:25
what's your take on this one ? :wink:

jonathanlevi
2016-09-22 17:25
Take, as in .. ?

mart0nix
2016-09-22 17:26
how to understand it as it's not super clear to me

jonathanlevi
2016-09-22 17:26
How clear the documentation is, or whether or not this is the ‘right way to go about it’ ?

jonathanlevi
2016-09-22 17:30
BTW: I don’t know where you saw this text.

jonathanlevi
2016-09-22 17:30
I can explain how this feature was implemented (back in the day)

jonathanlevi
2016-09-22 17:30
If that’s what you are asking?

mart0nix
2016-09-22 17:32
I'm trying to understand the ACL model and I'm going through the asset management exmaples; https://github.com/hyperledger/fabric/blob/master/examples/chaincode/go/asset_management/asset_management.go

jonathanlevi
2016-09-22 17:32
Oh, OK.

mart0nix
2016-09-22 17:33
tha paragraph was not clear to me although I understand english : ))

jonathanlevi
2016-09-22 17:33
Oh, it’s probably even less clear to English speakers, hands-down!

jonathanlevi
2016-09-22 17:34
:wink:

jonathanlevi
2016-09-22 17:35
Let’s me try to sum it up in a few lines…

jonathanlevi
2016-09-22 17:35
First, let’s take a step back: The feature effectively allows one a bit of a finer-grained way of access-control. E.g., allowing a specific user, say ‘Bob’ to execute a specific (named) transaction.

jonathanlevi
2016-09-22 17:36
----- Assume that this is the case, and that Alice has ‘granted’ or ‘allowed’ Bob to execute such a transaction (when she, Alice, deployed that transaction): -----

jonathanlevi
2016-09-22 17:37
In order for Bob to execute this transaction, using its name (binding)…. Bob need to sign it.

jonathanlevi
2016-09-22 17:37
And the checking is whether or not it is indeed Bob who is trying to execute it.

jonathanlevi
2016-09-22 17:38
The mechanism relies on PKI (specifically, Bob needs to prove that he is Bob)

jonathanlevi
2016-09-22 17:38
It is done by Bob needing to sign the transaction name/binding + the passed arguments using his private key.

jonathanlevi
2016-09-22 17:40
So using the CertificateHandler for his cert (E/TCert)… and the TransactionHandler (for obtaining the bindings of that transaction… Bob generates/creates a signature, using his private key…. and encloses it, as an argument, with a subsequent call to `NewChaincodeExecute()`

jonathanlevi
2016-09-22 17:41
----- [ So now that we know that :disappointed: and I do not really know if this was documented, or not, tbh ],

jonathanlevi
2016-09-22 17:42
` // metadata contains the signature under the signing key corresponding` - is that signature that Bob provided

jonathanlevi
2016-09-22 17:42
`// verification key inside certificate of the payload of the transaction` - this is the public key

jonathanlevi
2016-09-22 17:43
(that is in the E/TCert)

jonathanlevi
2016-09-22 17:44
`// payload of the transaction (namely, function name and args) and the transaction binding (to avoid copying attacks)` - is indeed the function name, actual args and the actual bindings.

jonathanlevi
2016-09-22 17:45
---

jonathanlevi
2016-09-22 17:45
Hope this makes more sense?

jonathanlevi
2016-09-22 18:23
@mart0nix ^^^ Please let me know...

mart0nix
2016-09-22 18:38
@jonathanlevi thanks - that clears it up a bit

mart0nix
2016-09-22 18:40
it sounds like E/TCerts could be both used for the same purpose - the Ecert is essentially the user public key and the Tcert is a unique certificate that is one-time transaction certificate ...?

mart0nix
2016-09-22 18:40
is that correct ?

mart0nix
2016-09-22 20:57
ok I have another question about privacy / security

mart0nix
2016-09-22 20:57
re: tcert-attribute support

mart0nix
2016-09-22 20:58
Multiple Account IDs per user: used for obfuscation purposes (each user may own many account IDs to mask their trading activities on a blockchain network.)

mart0nix
2016-09-22 20:59
if tca attribute-encryption is enabled

mart0nix
2016-09-22 20:59
there's no need to "obfuscate" by using multiple account IDS per user...

mart0nix
2016-09-22 21:00
@cbf is that correct ?

cbf
2016-09-22 21:01
I believe that is the design goal, yes - I’m not the crypto geek though

mart0nix
2016-09-22 21:05
got it

mart0nix
2016-09-22 21:06
and in terms of affiliations and banks_and_institutions attributes as in: https://github.com/hyperledger/fabric/blob/master/examples/chaincode/go/asset_management02/asset.yaml

jonathanlevi
2016-09-22 21:06
HOld on, hold on :wink:

mart0nix
2016-09-22 21:06
affiliations could be used as Tcert attributes to provide further control lists based not just on roles but also affiliations ?

mart0nix
2016-09-22 21:08
@jonathanlevi ?

mart0nix
2016-09-22 21:14
also "aca" stands for "Attribute Certificate Authority"

mart0nix
2016-09-22 21:14
but what does "eca" stand for ?

nickgaski
2016-09-22 21:19
eca - enrollment cert authority tca - transaction cert authority

mart0nix
2016-09-22 21:24
aha

claytonsims
2016-09-22 21:25
Some have asked about where to find backlog proposals from IBM contributors. To find proposed backlogs take a look at the public boards that were created for various components such as ledger, consensus, endorser, etc. Each will contain the current thinking of backlog and current thinking relative to priorities. We would like feedback and if there are user stories or tasks that look interesting please jump in.

mart0nix
2016-09-22 21:25
so @nickgaski is it fair to say that affiliations are Ecert attributes as oppsoed to Tcert attributes ?

nickgaski
2016-09-22 21:27
I would agree with that interpretation. If you look at the membersrvc.yaml you can see that enrollment can be curated to include a variety of features - amongst them, affiliations. However, with anything in the member services realm I would defer to Jonathan Levi

jonathanlevi
2016-09-22 21:28
Enrollment CAuth

jonathanlevi
2016-09-22 21:29
(sorry my internet is not great)

jonathanlevi
2016-09-22 21:29
Wanted to add just one line up there: it’s better to treat/regard TCerts as the more public documents.

jonathanlevi
2016-09-22 21:30
The Enrollment/registration itself (these days) is still relatively more private than a TCert.

mart0nix
2016-09-22 21:30
@jonathanlevi got it - it does seem like you can enable encryption for Tcerts and their attributes

mart0nix
2016-09-22 21:31

jonathanlevi
2016-09-22 21:32
Yes and no. (I am aware of this, thanks).

jonathanlevi
2016-09-22 21:33
I might not stay up much longer, but just quickly. The Attribute Encryption feature is disabled by default and can be enabled, but still, it has some limitations. Just a warning.

jonathanlevi
2016-09-22 21:34
The bootstrapping/the initial keys is something that requires taking care of, especially when working with containers. But, still, the EnrollmentID is still something that should be treated with caution, so it’s better to use the keys that are in your TCerts.

jonathanlevi
2016-09-22 21:36
[That was a v late night attempt of providing you with the right information, not too much details, while leaving you with actionable steps :wink: ]

mart0nix
2016-09-22 21:38
and is it possible to find linkability between Ecerts and Tcerts

mart0nix
2016-09-22 21:38
if yes - what are some strategies to prevent that?

jonathanlevi
2016-09-22 21:44
Many strategies (like key refresh, short sessions, sub account ID/aliases), but most importantly (and to be super direct and honest) Cryptographically, you’d need to have the Attribute Encryption working. Otherwise, it will indeed be possible to still link transactions...

jonathanlevi
2016-09-22 21:46
There was/is working in progress to enable this, but you should be aware of this, when/prior to breaking your “tasks” to blockchain transactions. It really depends on your cryptographic/business needs (e.g., anonymity? privacy? ….etc.)

jonathanlevi
2016-09-22 21:46
BTW: The last few pages, should have probably been asked in the #membership-services channel :wink:

mart0nix
2016-09-22 21:46
as of right now is Tcert attributes encryption working?

jonathanlevi
2016-09-22 21:46
[ I was too tired to notice ;-)]

mart0nix
2016-09-22 21:47
oh cool - I will join the channel

jonathanlevi
2016-09-22 21:48
Please do. es, you can enable it. But as I said/wrote, it will still require some work in deployment… but yes, when we tested it on v0.5 it worked (keeping in mind that it was a new feature, etc. and the rest of the associated disclaimers).

mart0nix
2016-09-22 21:50
got it

mart0nix
2016-09-22 21:50
thanks so much for the info

jonathanlevi
2016-09-22 21:50
NP. Welcome to Hyperledger Fabric!

kostas
2016-09-22 21:56
@kostas has left the channel

mart0nix
2016-09-22 21:57
@jonathanlevi so to wrap this up - EnrollmentID Role Password Affiliation Affiliation_Role are being assigned during enrollment (Ecert)

mart0nix
2016-09-22 21:57
when a user provides Tcert attributes for a particular transaction

mart0nix
2016-09-22 21:58
the Attribute Certificate Authority checks for the validity of the transaction attributes

mart0nix
2016-09-22 21:58
based on the enrollment attributes of the user

mart0nix
2016-09-22 21:58
is that a fair statement ?

simon
2016-09-23 12:58
@simon has left the channel

ian.pattison
2016-09-23 13:25
has joined #fabric

mart0nix
2016-09-23 21:47
I'm trying to figure out if the possible user roles under eca are limited only to 4: "client, peer, validator, auditor"

mart0nix
2016-09-23 21:56
also it looks like Affiliation and Role could be specified both during registration and as Tcert attributes ?

mart0nix
2016-09-23 22:29
is there an example for an auditor use case

zaki
2016-09-23 22:56
I recently observed that if launch a chaincode with confidentiality off and send the chaincode an invoke from the sdk with confidentiality on. The chaincode errors and the binary dies.

zaki
2016-09-23 22:56
I haven't tried this on HEAD

ranjan008
2016-09-24 06:14
when i am doing any operation on fabric i am getting this error Error when querying chaincode: Failed loading TCerts from TCA

ranjan008
2016-09-24 06:14
what can be wrong?

garisingh
2016-09-24 10:31
@ranjan008 - can you provide a few more details on your setup and how you are accessing the fabric? (e.g. using the NodeSDK, etc)

cbf
2016-09-24 11:03
@zaki can you please file a JIRA, thanks!

zaki
2016-09-24 16:45

cbf
2016-09-24 17:21
@zaki danke

ccooper21
2016-09-25 13:31
Does anyone know if chaincode can be called using CORS? If so, what is the setup involved?

muralisr
2016-09-25 13:38
@ccooper21 chaincode interactions are via requests to peer. There’s no direct call (http or otherwise) on the chaincode itself. Can you clarify _chaincode can be called using CORS_ ?

muralisr
2016-09-25 13:44
Perhaps you are asking about CORS with the REST calls ?

ccooper21
2016-09-25 14:36
I'm working with a team to build a Hyperledger application at the Austin Blockchain Hackathon this weekend :slightly_smiling_face:

ccooper21
2016-09-25 14:38
We'd like to be able to call our chaincode across servers. So, that means calling the REST API endpoint for invoking chaincode (which I now realize is being serviced via the peer). So I guess my question should have been, does this endpoint support CORS? Or, asked another way is there a way to enable CORS for the peer?

ccooper21
2016-09-25 14:39
I don't know if it matters, but I'm running the peer in dev mode today since I am redploying code frequently, and ran into an issue deploying the code in production mode.

muralisr
2016-09-25 14:39
right.

muralisr
2016-09-25 14:40
I don’t know if (or how) the listener can be enabled for CORS

muralisr
2016-09-25 14:40
would it be possible to front end a httpserver which does ?

ccooper21
2016-09-25 14:42
yeah maybe. Do you know if Nginx can be made to do that?


muralisr
2016-09-25 14:42
you might be able to modify the rest endpoint (just for your hackathon of course)

muralisr
2016-09-25 14:44
to code would be in fabric/core/rest/

cbf
2016-09-25 15:25
: please see https://jira.hyperledger.org/browse/FAB-437 for getting a simple, bare-minimum, integration so we can test V1 flows - from @muralisr

ccooper21
2016-09-25 15:36
fyi, it looks like the peer returns CORS headers by default.

muralisr
2016-09-25 15:42
ok

mart0nix
2016-09-25 19:02
guys it seems like the gorocksdb project changed its rocksdb_options_set_compression_options() method recently

mart0nix
2016-09-25 19:03
so I'm not able to compile the asset_management_with_roles test file

mart0nix
2016-09-25 19:03
../../../../../hyperledger/fabric/vendor/github.com/tecbot/gorocksdb/options.go:328: not enough arguments in call to _Cfunc_rocksdb_options_set_compression_options

mart0nix
2016-09-25 19:05
is there a way to avoid using the fabric/vendor/github.com/tecbot/gorocksdb package ?

mart0nix
2016-09-25 19:32
I guess I will try to compile outside of the fabric repo

mart0nix
2016-09-25 19:33
unfortunately https://gopkg.in appears to be down

sheehan
2016-09-25 20:15
Are you running inside of vagrant or outside? If inside vagrant, it should pull down a version of RocksDB that is compatible the the vendored gorocksdb package. If outside, we should specify which version of RocksDB the peer is compatible with if we do not already. If you really want to use an unsupported version of RocksDB, you could just manually replace the gorocksdb package in the vendor folder, but you may encounter other issues

mart0nix
2016-09-25 20:21
yeah that's what I ended up doing but I had to stop because I can't fetch the http://gopkg.in/yaml.v2 package

mart0nix
2016-09-25 20:22

ranjan008
2016-09-26 04:26
@garisingh i am running the fabric using vagrant and accessing it using rpc

niubwang
2016-09-26 06:28
has joined #fabric

niubwang
2016-09-26 06:30
guys i use the pbft ,but the new joined peers can't sync the blocks from the other peers

niubwang
2016-09-26 06:31
who can help me

pushpalatha
2016-09-26 06:42
Hi All, Is there a way we get the information of which node initiated a particular transaction?

ranjan008
2016-09-26 07:16
@garisingh and one more thing when i am using /registrar api it is only giving loging functionality for already created users through membersrvc.yaml file is there any way we can create users when the fabric is in running mode through codes or api.

garisingh
2016-09-26 08:40
@ranjan008 - the NodeJS SDK allows you to create new users for membership services

garisingh
2016-09-26 08:41
it uses a GRPC-based API exposed by membership services directly

ranjan008
2016-09-26 11:03
@garisingh can we expect this feature to be there in RPC API anytime soon.

garisingh
2016-09-26 11:07
no. in order to create users you'll need to use the GRPC API provided directly by membership services rather than using an API through the peer

ranjan008
2016-09-26 11:11
ok thanks @garisingh

anhdung
2016-09-26 14:03
has joined #fabric

anhdung
2016-09-26 14:06
hi everyone, nice to meet you all! :slightly_smiling_face: Has anyone tried and succeeded in setting up fabric in different physical machines (or vms) connecting to the same pbft blockchain?

vzhou
2016-09-26 14:13
@anhdung Yep, with the caveat that I had to increase all of the timeout lengths to get it to work

anhdung
2016-09-26 14:14
@vzhou great, can you share some references that I can dig a bit deeper ?


vzhou
2016-09-26 14:16
but when you're starting up additional validating peers, you're not adding to the docker-compose file on the first VM, but creating another docker-compose file on your second VM and pointing it to FIRST_SERVER_IP:7051

anhdung
2016-09-26 14:18
so basically on the second VM we will start another docker container, but it will reference to the first VM if I’m correct ?

vzhou
2016-09-26 14:29
yes, that's correct

anhdung
2016-09-26 14:44
ok, I will dig into it, huge thanks @vzhou :slightly_smiling_face:

mart0nix
2016-09-26 15:17
has anyone else noticed that http://gopkg.in has been down for at least a day now ?

sheehan
2016-09-27 00:41
@mart0nix maybe try https://github.com/kardianos/govendor? If you’re using the Vagrant image it’s already installed, though it may be an older version

sheehan
2016-09-27 01:23
@jackkleeman so the DB is just RocksDB. You could try https://github.com/hyperledger/fabric/tree/master/tools/dbutility for exploring the DB

jackkleeman
2016-09-27 01:23
has joined #fabric

sheehan
2016-09-27 01:23
in terms of why your partial key queries are not working, you may want to look at the example at https://github.com/hyperledger/fabric/blob/master/bddtests/chaincode/go/table/table.go

jackkleeman
2016-09-27 01:28
can you point me in the right direction? I'm not seeing any immediate difference between my code and theirs

sheehan
2016-09-27 01:31
you have a table with two columns which are both keys?

jackkleeman
2016-09-27 01:31
three columns, first two of which are keys

jackkleeman
2016-09-27 01:37
I had a similar issue in the past where if I gave a complete set of keys to getRows it would return empty as well. I have been very confused by this function!

sheehan
2016-09-27 01:38
I’m not seeing anything wrong with the code snippet you posted. Are you giving the keys in the same order that they’re defined in the table?

jackkleeman
2016-09-27 01:42
I am certain that I am

jackkleeman
2016-09-27 01:43
would the hyperledger explorer give me any information on my tables?

sheehan
2016-09-27 01:51
hmm, not sure how useful it would be in this case. It’s possible that some bug has been introduced. If you’re willing to do a bit of hacking you could look at what is being stored vs what GetRows is trying to retrieve. https://github.com/hyperledger/fabric/blob/master/core/chaincode/shim/chaincode.go#L839

sheehan
2016-09-27 01:51
I don’t have an env setup on the laptop I’m on at the moment so I can’t look into it as this moment

jiangytcn
2016-09-27 02:11
has joined #fabric

brianeno
2016-09-27 02:26
has joined #fabric

jackkleeman
2016-09-27 03:05
I have solved my error - I have somehow managed to set only the first column as the key, and it goes back to my earlier bug - getrows returns blank when given all keys needed (or is this deliberate?)

xixuejia
2016-09-27 03:07
has joined #fabric

xixuejia
2016-09-27 03:33
Hi, I have a question for the GetRows() method. Say, I have a table with 4 columns A|B|C|D, A and D are keys, how can I query by column D? I guess it's not supported in 0.5-developer-preview, right?

bgorman
2016-09-27 03:39
@xixuejia I don't think there's any sort of SQL-like queries in there yet... you can just get the table and the rows

xixuejia
2016-09-27 04:47
@bgorman thank you!

g_alexander
2016-09-27 09:12
has joined #fabric

yannik
2016-09-27 10:36
The chaincode throws an error when trying to store an empty string on the blockchain: `err = stub.PutState("Test", []byte(""))` -> `Failed to handle PUT_STATE. Sending ERROR`. Is it by design?

ranjan008
2016-09-27 12:28
@garisingh there is a signature struct parameter in registeruserreq through grpc i am setting some values in signature but it is giving me this error UNKNOWN: Signature verification failed. what and how does we have to assign the values to the parameters in signature any doc on that?

niubwang
2016-09-27 12:53
hi guys, when i add a new validator peer (using PBFT), the new peer can't sync blocks from the others, who can help me?

cbf
2016-09-27 14:46
@niubwang presently, with the v0.6 architecture, it is not possible to add members to a network

cbf
2016-09-27 14:47
as we begin delivering on the ‘v1.0’ architecture, it will be possible to add certain elements (endorsers, initially and eventually consenters)

andreaturli
2016-09-27 14:52
has joined #fabric

niubwang
2016-09-27 14:58
@cbf do you konw when the 'v1.0" maybe released?


thomas.marckx
2016-09-27 15:04
I’m having difficulties enrolling new users. Currently I just add them in the membersrvc.yaml, after which I delete everything in /var/hyperledger/production. I rebuild the membersrvc and run it (I also start a new peer). This works sometimes but now I keep receiving the following error ```{ Error: 'rpc error: code = 2 desc = Identity or token does not match.' }``` I understand that password in the yaml is view as a one-time, but I expect this be “reset” when I delete everything in production Anyone have an explanation ?

niubwang
2016-09-27 15:04
@thomas.marckx thanks, where i can get these information?

thomas.marckx
2016-09-27 15:06
@niubwang I’m not sure where I found it. :slightly_smiling_face: Just keep your eye on the slack channels and useful information will pass by ….

thomas.marckx
2016-09-27 15:07
perhaps @cbf knows where these kinds of administrative documents are centralised

cbf
2016-09-27 16:00
@thomas.marckx currently, you can only add new users dynamically using the nodeSDK

cbf
2016-09-27 16:01
@niubwang we have a goal of getting v1.0 out early 2017 as seen in the graph above

cbf
2016-09-27 16:04
for fabric, look in the old wiki - we haven’t yet migrated the content to the new hyperledger wiki https://github.com/hyperledger-archives/fabric/wiki

niubwang
2016-09-27 16:40
@cbf it is not possible to add validator members to a network. i want the non validator peer to sync the blocks dynamically, do you think it is easy to implement this?

cbf
2016-09-27 16:44
our architecture has changed for v1 and we don’t plan to pursue enhancements to the architecture in v0.6… however, as noted, it will be possible to add endorser peers - but the set of consenters/orderers will be fixed for v1 and we’ll look at making the set of consenters dynamic post v1.0 release


tuand
2016-09-27 16:46
cbf beat me to it but I think what you want to do maps to adding validators in the new architecture

markparz
2016-09-27 16:55
Posting new playbacks to the #playbacks channel here on slack. See the latest development and thinking by the community, and feel free to ask questions and get involved.

niubwang
2016-09-27 17:08
@tuand thanks, i don't have so much time waiting for the v1.0, i must find a solution base the v0.6 version,

jessewalia
2016-09-27 17:11
has joined #fabric

matanyahu
2016-09-27 19:08
@thomas.marckx @niubwang : the timeline comes from NextGen Consensus ppt wriiten by @binhn you can search for it in Slack

cbf
2016-09-27 19:59
@niubwang what are your requirements?

wil.pannell
2016-09-27 21:31
has joined #fabric

niezx
2016-09-28 01:12
has joined #fabric

gauthampamu
2016-09-28 02:20
has joined #fabric

mikedeshazer
2016-09-28 03:28
has joined #fabric

tandava
2016-09-28 05:57
has joined #fabric

venkat
2016-09-28 07:53
I just saw in the docs that fabric leaves user authentication to application layer. In that case, I assume that the user authorization as well is outside the fabric's responsibilities. Does that mean chaincode should not use the user role while validating a data change?

venkat
2016-09-28 08:20
But I see the user roles in the memsrvc yaml file. So wondering how does fabric utilize the role information when it doesn't authenticate every user request?

garisingh
2016-09-28 08:53
@venkat - "application layer" includes chaincode. The fabric does a basic level of authentication / authorization whens security is enabled in that it checks for valid signatures and checks that certificates were issued by membership services. It also provides primitives for accessing the credentials (aka certificate) of the caller from within chaincode but it is up to the chaincode developer to create access control rules Right now the "roles" provided by the fabric via membership services are only used in 2 ways: - when a peer starts up as a validator there is a check to see that it was the right role - when registering new users there is metadata which specifies which roles (if any) a user can register users as

venkat
2016-09-28 09:06
When a client applciation sends a REST invoke request after succesful login, the REST request itself is not carrying any identity info except for the securityContext attribute in the json data. How is the request authenitcated?

bfuentes
2016-09-28 09:07
Where can we find the roadmap of Blockchain service in Bluemix ? I just saw the v0.6.0 has being tagged to "developer-preview", does this mean that this will be deployed soon on Bluemix ? Thanks

garisingh
2016-09-28 09:08
@venkat - this is exactly why we want to move the REST interface out of the fabric peer itself and run it outside. Basically, think of the current REST interface as providing an interface to a "wallet" service provided by the peer

bfuentes
2016-09-28 09:10
The protocol still remain HTTP ? is swagger UI that will be moved out ?

garisingh
2016-09-28 09:10
@bfuentes - we typically try to update the BMX services to the latest release of the fabric within 3-4 weeks of the "final" release of a major version. There are still a few bugs in v0.6 which we are tracking to fix

venkat
2016-09-28 09:12
@garisingh - do you mean the request through hfc will carry identity info?

garisingh
2016-09-28 09:12
@bfuentes - pulling the REST interface outside the peer is slated for the v1.0 timeframe. Nothing will change for v0.5 / v0.6 . The reality is that there are 2 interfaces to the fabric today - one is REST (but as mentioned above this really ends up with a given peer acting as a client to the fabric on your behalf) and the other is GRPC (which you can interact with using the NodeSDK)

garisingh
2016-09-28 09:13
@venkat - hfc uses the native GRPC API which actually includes signing each transaction with the proper transaction certificate based on the user you choose to use

venkat
2016-09-28 09:16
So the request will carry a txn request signed using transaction certs. Does that help chaincode to extract user info from txn certs?

garisingh
2016-09-28 09:18
yes - and BTW - this is still the case when you use REST as well - basically the peer on which you invoke the REST API will sign transactions with the certs for the user specified in secureContext

garisingh
2016-09-28 09:18
there are methods within chaincode to extract the caller information

venkat
2016-09-28 09:20
Peer will sign in case of REST and nodeSdk/hfc will sign in case of GRPC?

garisingh
2016-09-28 09:21
With REST, the peer signs with the certificates of the user specified in secureContext (and uses the GRPC API to submit the transaction as well)

garisingh
2016-09-28 09:22
With GRPC directly, you actually have better control of the enrollment material for the users. In the case of REST, the enrollment material for the users you "login" are stored with the peer

venkat
2016-09-28 09:23
So in case of using node/hfc also, the signing actually happens at peer only, right? Or is it that signing is already done when the request reaches the peer?

ranjan008
2016-09-28 09:24
when i am making a grpc call to membersrvc for registering a user i am getting this error UNIMPLEMENTED: unknown service protos.ECAA what am i doing wrong?

garisingh
2016-09-28 09:24
@venkat - with REST signing happens at the peer. With GRPC signing happens at the client prior to submitting to the peer

garisingh
2016-09-28 09:25
@ranjan008 - how are you calling membership services?

venkat
2016-09-28 09:25
@garisingh - Thanks !

garisingh
2016-09-28 09:25
sure thing

ranjan008
2016-09-28 09:26
i have created a grpc client using the ca.procto file in the memberservice package

garisingh
2016-09-28 09:30
what language are you using?

ranjan008
2016-09-28 09:30
java

ranjan008
2016-09-28 09:31
for creating the client

garisingh
2016-09-28 09:42
I have not looked at how Java generates GRPC stubs, but somehow there is a naming mismatch between the client and the server here

ranjan008
2016-09-28 09:44
ok thanks i will try to figure that out

sukrith
2016-09-28 15:13
any tips on how to go about testing chaincode written in go

sukrith
2016-09-28 15:14
is my only option 1. deploying a node locally 2. deploying the chaincode 3. invoking commands 4. monitoring the states

cbf
2016-09-28 17:14
@sukrith for _development_ of chaincode, use the —peer-chaincodedev flag when starting the peer, and you can run the chaincode yourself. This makes for a much easier dev-test-debug-repeat cycle as you don’t have to torture yourself searching for, and ssh’ing into the docker container running your chaincode.

cbf
2016-09-28 17:14
for use in a POC, you probably want the network mode, which starts with deploying the chaincode with the SDK.

cbf
2016-09-28 17:15
so yes, what you describe is correct, but for the iterative development process, —peer-chaincodedev mode is easiest to attach a debugger etc


shukla
2016-09-28 17:38
has joined #fabric

nbutters
2016-09-28 18:10
has joined #fabric

sukrith
2016-09-28 21:12
thanks! so i was able to use option 2 and I was able to register the chaincode. How do I start making calls to it?

sukrith
2016-09-28 21:14
everytime I try to "peer chaincode deploy -n mycc -c '{"Function":"init", "Args": ["a","100", "b", "200"]}’ "

sukrith
2016-09-28 21:14
it says peer not found

ccooper21
2016-09-28 21:42
@sukrith you need to set an environment variable that identifies the peer endpoint. so your deployment request would like something like: ``` CORE_PEER_ADDRESS=172.17.0.1:7051 peer chaincode deploy -l golang -n mycc -c '{"Function": "init", "Args": ["a","100","b","200"]}' ```

hippyyao
2016-09-29 01:25
has joined #fabric

sukhoi
2016-09-29 01:37
has joined #fabric

arvin
2016-09-29 04:11
when i run docker-compose up ,i get this message: vp0_1 | 04:10:09.990 [peer] handleChat -> ERRO 02e Error handling message: Peer FSM failed while handling message (DISC_HELLO): current state: created, error: transition canceled with error: Error Verifying signature for received HelloMessage: Invalid peer id. It is empty., what can i do?

ranjan008
2016-09-29 05:19
@garisingh hi i tried a lot but not able to figure out same error is popping up again and again can you suggest some one who might have implemented grpc client through java and might help figuring me out the mistake i might be doing?

garisingh
2016-09-29 11:37
@ranjan008 - the only GRPC stuff in Java I know of is in the Java chaincode package. It uses GRPC to communicate with the peer - https://github.com/hyperledger/fabric/tree/master/core/chaincode/shim/java

garisingh
2016-09-29 11:38
you might want to poke around in there to see what they did

thefringe
2016-09-29 12:41
has joined #fabric

thefringe
2016-09-29 12:44
Hi! Is there a tutorial/guide for deploying on amazon. I've got multiple nodes on different machines connected to each other. But when I query the machine it doesn't respond. Only the first machine responds with an 200 OK

grbulat
2016-09-29 13:11
has joined #fabric

sheehan
2016-09-29 13:34
@ranjan008: I wrote a java client using gRPC. It's probably no longer compatible and doesn't talk to membership services, but may be a useful example https://github.com/srderson/hyperledger-fabric-utxo-client-java

sukrith
2016-09-29 14:26
@ccooper21 Hey i took your suggestion but it still doenst work

sukrith
2016-09-29 14:26
i just get -bash: peer: command not found

sukrith
2016-09-29 14:27
do i need to be in a specific directory?

vzhou
2016-09-29 15:36
Hi; I'm trying to deploy chaincode using the NodeSDK and I'm getting this error after trying to deploy the chaincode in network mode: cannot stat 'src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml': No such file or directory

vzhou
2016-09-29 15:36
I already vendored the dependencies and it doesn't pull in peer/core.yaml; is this expected?

atulkc
2016-09-29 17:23
Hi! I need some help in debugging the issue I am facing with my hyperledger block chain deployment. I have a hyperledger fabric deployment with 4 nodes (pbft consensus is enabled). I deployed a couple of smart contract and it worked fine for one day. But today when I am invoking smart contract I am noticing that the transaction is not getting distributed to all the peers and the transaction is never included in any block. In fact the block chain height is not changing at all! I looked at peer log and do not see any `ERR`. Only one peer to which I submitted the transaction shows these logs: ``` [2016-09-29 17:15:01+0000] 17:15:01.705 [devops] invokeOrQuery -> INFO 767a Transaction ID: 8c91e0ac-5e8d-41ca-8845-c6c72f27ad1d [2016-09-29 17:15:01+0000] 17:15:01.705 [rest] processChaincodeInvokeOrQuery -> INFO 767b Successfully submitted invoke transaction with txuuid (8c91e0ac-5e8d-41ca-8845-c6c72f27ad1d) [2016-09-29 17:15:01+0000] 17:15:01.705 [rest] ProcessChaincode -> INFO 767c REST successfully submitted invoke transaction: {jsonrpc:2.0,result:{status:OK,message:8c91e0ac-5e8d-41ca-8845-c6c72f27ad1d},id:0} ```

atulkc
2016-09-29 17:30
Any pointers on what to look for in logs to know what is the problem? I am using `0.5-developer preview` release

arvin
2016-09-29 17:36
@atulkc if you can't query about it ,i think you deploy chaincode isn't success.or you can 'docker ps ' get the chaincode containers .

atulkc
2016-09-29 17:42
@arvin chaincode was deployed successfully and I had invoked it successfully previously. Also, query operations are successful. Somehow now the invoke operations are not getting added in the blockchain and new changes won't propagate to world state.

atulkc
2016-09-29 17:45
also I noticed that (by doing `docker ps -a`) that new docker containers are not getting created

ccooper21
2016-09-29 19:47
@sukrith `peer` should be in your path if you have gone through the devenv setup, and built the `peer` executable via the `make` command. you may have to relogin for the path changes to take affect

rajnair2k
2016-09-29 20:09
has joined #fabric

cbf
2016-09-29 22:49
@atulkc: many of us are traveling today unfortunately I am one of them;-)

cbf
2016-09-29 22:49
is there a reason you are using v0.5?

cbf
2016-09-29 22:51
there was a bug that sounds like what you are running, but I believe it was fixed. You might want to consider upgrading to v0.6-preview but you'll need to adapt your chaincode

ashishkel
2016-09-29 23:35
Hi, Just trying to clear my concept. In general Blockchain is an irrevocable and immutable ledger - Hyperledger Fabric also is - as per definition. Now, I have been using a table to store my data in Fabric. But If I have a replaceRow API or deleteRow API, then isn't that going to conflict the concept of Blockchain itself ?

ghaskins
2016-09-29 23:58
@ashishkel I think you are conflating the state of a chaincode application with the history of the state changes

ghaskins
2016-09-30 00:00
something like “deleteRow” can help transition from one state to the next, but that is independent of the history of steps that brought us to a specific state at a point in time

ghaskins
2016-09-30 00:00
the “blockchain” is part of the history mechanism

ghaskins
2016-09-30 00:00
does that make sense

ghaskins
2016-09-30 00:00
?

ghaskins
2016-09-30 00:01
so your application can “mutate” its state to transition from an old state to a new state, and the blockchain can record the history of all of those transitions, and both concepts can coexist

ashishkel
2016-09-30 00:16
@ghaskins , Hmm. Now I get it. History remains intact. Hence the concept of Blockchain prevails. And any such operation like delete/replace etc, is actually transforming the present state -> to another state. Ohkay. Agreed. Thanks @ghaskins

ghaskins
2016-09-30 00:19
Right. It's like how git works. You can delete a file "now", but the history that the file once existed still remains

ashishkel
2016-09-30 00:19
:slightly_smiling_face: as simple an example as that :slightly_smiling_face:

mart0nix
2016-09-30 04:34
I'm tryring to run the JS asset-mgmt-with-roles unit test the first assign test fails with: *{\"Error\":\"Failed retrieving owner for MyAsset. \"}"}*

mart0nix
2016-09-30 04:34
this is the line that fails in the actual chaincode: *callerRole, err := stub.ReadCertAttribute("role")*

mart0nix
2016-09-30 04:34
and this is the corresponding JS code:

mart0nix
2016-09-30 04:34
```function assignOwner(user,owner,cb) { var req = { chaincodeID: chaincodeID, fcn: "assign", args: ["MyAsset",owner], attrs: ['role'] };```

mart0nix
2016-09-30 04:35
any ideas ?

ranjan008
2016-09-30 04:44
@sheehan i have created the client in exact same way but when i am trying to hit the server its giving me unknown service error any suggestions for this error?

ranjan008
2016-09-30 05:18
you mentioned its no longer compatible and doesn't talk to membersrvc . Is it that the thing is happening in my case if yes then any solution for this?

nits7sid
2016-09-30 05:49
Hi i am trying to use node-sdk on ibm bluemix. i am getting following error on the first call to any invoke or query functions. Error: { [Error] code: 14, metadata: Metadata { _internal_repr: {} } }

shannon_wie
2016-09-30 05:53
has joined #fabric

arvin
2016-09-30 05:55
18:00:29.894 [peer] handleChat -> ERRO 15ba8 Error handling message: Peer FSM cannot handle message (DISC_GET_PEERS) with payload size (0) while in state: created what can i do ? i have tried many ways……

nits7sid
2016-09-30 05:58
Hi i am trying to use node-sdk on ibm bluemix. i am getting following error on the first call to any invoke or query functions. Error: { [Error] code: 14, metadata: Metadata { _internal_repr: {} } }

ccooper21
2016-09-30 06:09
@nits7sid I haven't used BlueMix so I may not have the necessary context for your question. However, it seems like there have been a number of challenges because BlueMix is still on Fabric v0.5 while everything else has moved forward with backwards incompatible changes

nits7sid
2016-09-30 06:12
ohh. @ccooper21 Is it because of gRPC calls with tls?

nits7sid
2016-09-30 06:12
or the error is specific to bluemix blockchian network?

ccooper21
2016-09-30 06:18
not sure. I just know that the difference in versions causes somethings to break. e.g. example chaincode that works with BlueMix does not work with Fabric at the moment, and vica versa. I'm just speculating that your problem might be related, especially if you are using the most recent Node SDK code

ccooper21
2016-09-30 06:19
I think the Node SDK is new as of this month, so I'm guessing there isn't a v0.5 compatible version

balakrishna
2016-09-30 06:48
@mart0nix Can you please post the command used to start the membersrvc ?

balakrishna
2016-09-30 06:50
@mart0nix membersrv should be enabled with "ACA" in order to work with attributes. Try using command "MEMBERSRVC_CA_ACA_ENABLED=true membersrvc" for starting membersrv it worked for me.

martijnwouters
2016-09-30 08:09
has joined #fabric

thefringe
2016-09-30 08:33
Hi Guys. What could cause the "Error:Failed to launch chaincode spec(Could not get deployment transaction for " error message. I'm deploying chaincode with the nodejs SDK, it is returning a chaincodeID so the I guess the deployment is succesfull right

garisingh
2016-09-30 08:55
@thefringe (nice name btw :wink: ) - the deploy transaction is async - so while you get back a response - it basically means the transaction was accepted / acknowledger by the peer

garisingh
2016-09-30 08:56
it does not mean the chaincode deployment was succesful

garisingh
2016-09-30 08:56
you should see entries in your peer log if deployment fails

mart0nix
2016-09-30 09:00
@balakrishna I'm using a docker image and a docker-compose file to start membersrvc

thefringe
2016-09-30 09:02
@garisingh Aah oke I'll check the peer logs then ( and thnx for the compliment :stuck_out_tongue: )

mart0nix
2016-09-30 09:03
@balakrishna I will try adding the option: MEMBERSRVC_CA_ACA_ENABLED in docker-compose.yml

thefringe
2016-09-30 10:15
Very strange error: { [Error: sql: no rows in result set] code: 2, metadata: Metadata { _internal_repr: {} } }

garisingh
2016-09-30 10:18
@thefringe - related to the chaincode issue above? the error is coming from membership services and if seeing that as result of the deploy transaction then likely an issue with the peer getting transaction certificates to submit the deploy transaction. Exactly how are you running your peer(s) and membership services?


thefringe
2016-09-30 10:44
@garisingh Could it be because there is no cert file specified in membersrvc.yaml ? Sorry but I'm really lost with this

garisingh
2016-09-30 10:48
I'll attempt to run that compose file locally

garisingh
2016-09-30 10:48
and deploy chaincode

garisingh
2016-09-30 11:07
so I just ran the same compose file with no issues

garisingh
2016-09-30 11:08
you might want to delete any containers you have and then try running compose again

thefringe
2016-09-30 11:45
@garisingh Still no luck. I deleted any container. But still the same error. How did you deploy the chaincode? I'm doing it with the nodesdk.

garisingh
2016-09-30 11:49
I was lazy and used REST

garisingh
2016-09-30 11:49
you might want to delete `/tmp/keyValueStore` first and then try again with the SDK

ccooper21
2016-09-30 11:55
@garisingh Did I imagine it or was it mentioned that the REST API is going away at some point?

balakrishna
2016-09-30 11:56
@mart0nix sure. Try that and let me know if that doesn't work. BTW what are you trying to create ?

garisingh
2016-09-30 11:57
@ccooper21 - for v1.0.0 but not for v0.6 release stream

ccooper21
2016-09-30 11:58
When the REST API is removed, what will the alternative be?

nits7sid
2016-09-30 11:58
When is v1.0 is set to relase?

garisingh
2016-09-30 12:00
@ccooper21 - we should probably clarify - the idea is to remove the transactional REST API out of the peer but (hopefully) within a reasonable timeframe provide an analogous interface which runs outside the peer (basically build a REST server which uses the SDK on its backend)

garisingh
2016-09-30 12:00
but alternative is the client SDKs - we have NodeJS today and will have others in the future. They all use the native GRPC APIs

garisingh
2016-09-30 12:01
@nits7sid - work in progress with incremental delivery through the end of March 2017 for initial release

nits7sid
2016-09-30 12:01
@garisingh - okay! Will that also include point-in time queries?

garisingh
2016-09-30 12:02
that's the plan

nits7sid
2016-09-30 12:02
Ohkay.. And wat about consensus. XFT or PBFT?

ccooper21
2016-09-30 12:03
Is there a v1.0 release definition somewhere that folks can read?

thefringe
2016-09-30 12:22
@garisingh no more sql errors after I deleted /tmp/keyValueStore, thnx

mart0nix
2016-09-30 12:35
@balakrishna I'm just trying to run a more advanced example with the node SDK (outside of the hello world sample)

mart0nix
2016-09-30 12:35
I'm particularly interested in identity management and roles examples

balakrishna
2016-09-30 12:37
@mart0nix Did membersrv with ACA enabled worked ?

elcalafate
2016-09-30 12:43
has joined #fabric

thefringe
2016-09-30 12:47
@garisingh I'm sorry but I still need your help:sob: Now I'm getting this error: Error building images: The command '/bin/sh -c go install build-chaincode && cp src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chaincode $GOPATH/bin/379d5a80387d430ba965de49a0f3f7fc1e8823d053b7fd3bc4a513c199ecf57b' returned a non-zero code: 1

mart0nix
2016-09-30 12:55
@balakrishna 1..3 # tests 3 # pass 3 # ok

mart0nix
2016-09-30 12:55
YAY!!!

mart0nix
2016-09-30 12:55
@balakrishna thanks man. Where can I see all the environment options for the membersrvc module

mart0nix
2016-09-30 12:55
WOW - I've been trying to run one of these examples for a few days now

mart0nix
2016-09-30 12:55
phew

mart0nix
2016-09-30 12:56
@balakrishna :clap:

balakrishna
2016-09-30 12:57
@mart0nix You are welcome

mart0nix
2016-09-30 13:04
@balakrishna Where can I see all the environment options for the membersrvc?

balakrishna
2016-09-30 13:33
You can see all environment options for the membersrvc in fabric hyperledger documentation. However it seems like enabling the "ACA " part is missing in document. Even i have faced same issue for days and figured out the issue while going through the script file "run-unit-tests.sh"

balakrishna
2016-09-30 13:34
@mart0nix path : fabric/sdk/node/bin

hhadass
2016-09-30 14:53
Hi everyone. I'm attempting to install fabric and have docker installed on my machine. I am following option 2 as detailed in the docs here: http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Chaincode-setup/ However when i attempt to execute the 'docker pull hyperledger/fabric-peer:latest' command i get a 'docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?.' message. I've looked around but can't seem to solve it. So far i understand that I need to log out and then back in to the docker registry after adding my username to a docker group? Could anyone who has come across this issue help me solve it? Thanks :slightly_smiling_face:

thefringe
2016-09-30 14:54
@hhadass Yeah logging out and back in works or do a reboot if it's not a critical machine

abbas
2016-09-30 14:54
has joined #fabric

hhadass
2016-09-30 14:58
@thefringe this is on my own computer. what is the registry name that i need to log in and out of? or is this a registry i need to set up on my own machine (sorry i'm not a docker expert :disappointed: ) ?

andriian
2016-09-30 14:59
Hello, I'm trying to init the chaincode https://github.com/hyperledger/fabric/blob/master/examples/chaincode/go/asset_management_with_roles/asset_management_with_roles.go but for some reason assignerRole, err := stub.GetCallerMetadata() returns zero length []byte for assignerRole I tried it locally in dev & regular mode and in Bluemix and it returns no metadata for in any case and for different users in "secureContext" Actually, my current task is to get info about current user (name, role) to check his permissions in chaincode functions. Can you please advise?

garisingh
2016-09-30 14:59
@hhadass - what OS are you running?

hhadass
2016-09-30 15:00
@garisingh ubuntu 16.04

garisingh
2016-09-30 15:02
so options: 1) try `sudo docker info` - if this is successful then the daemon is running and you simply need to run command as root or via `sudo` 2) if you get the same error, then `sudo service docker start` 3) if you want to run `docker` commands as a non-root user, then you'll need to add your userid to the `docker` group

garisingh
2016-09-30 15:02
those would be my initial guess(es)

hhadass
2016-09-30 15:05
@garisingh step one works fine

garisingh
2016-09-30 15:05
then try `sudo docker pull ....`

hhadass
2016-09-30 15:06
@garisingh get the same err :confused:

garisingh
2016-09-30 15:07
`ps -ef|grep docker` - what's the output of that?


garisingh
2016-09-30 15:10
`DOCKER_HOST="" docker pull .....`

hhadass
2016-09-30 15:16
@garisingh yes! thanks :smile: Can this be added to the docs possibly? or am i the only one with this problem?

garisingh
2016-09-30 15:18
the error is a bit odd since it looks like Docker was started with both tcp and unix socket (default) listeners

garisingh
2016-09-30 15:18
so `docker pull` should have worked

hhadass
2016-09-30 15:19
@garisingh ah i see

jzhang
2016-09-30 15:48
does anybody know what this error might mean? error={"error":{"code":12,"metadata":{"_internal_repr":{}}},"msg":"Error: unknown service protos.Peer" got this when chaincode deploy targeting a docker-based network from my host system (using peer address , the port 7053 is mapped to docker port 7053 in docker-compose)

jzhang
2016-09-30 15:55
(i’m switching to vagrant for now, but still curious what the above error means)

sukrith
2016-09-30 15:56
for testing purposes is there a way to delete everything stored in the worldstate in the init function of chaincode

hhadass
2016-09-30 16:19
@garisingh is there a way of removing the output of `ps -ef|grep docker` so i don't get the same issue again?

jzhang
2016-09-30 16:24
never mind my question above, should’ve used port 7051 instead of 7053 for deploying to peer

kent_landholm
2016-09-30 17:49
has joined #fabric

garisingh
2016-09-30 18:36
sorry @hhadass - was away for a bit. looks like you should `kill` the current running docker processes and then start docker via `sudo service docker start`

hhadass
2016-09-30 19:02
@garisingh no worries! all done, thanks :slightly_smiling_face:

aliblackwell
2016-09-30 22:13
has joined #fabric

aliblackwell
2016-09-30 22:45
@sukrith I doubt it, you will probably have to turn your peer off and on again to wipe it.

atulkc
2016-10-01 03:14
@cbf thanks for the info...I will upgrade to 0.6-preview and check

richardchu
2016-10-01 06:40
has joined #fabric

wanghaibo
2016-10-01 13:20
has joined #fabric

hhadass
2016-10-01 23:18
Hi, I'm having some issues again getting fabric up and running. I've followed the docs here, http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Chaincode-setup/ using option 2 for setting up the chaincode and everything works fine. I'm now attempting to set up the network with validating peers following this guide http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Network-setup/#starting-up-validating-peers and when i run `docker images` i get a `Cannot connect to the Docker daemon. Is the docker daemon running on this host?` error. Any tips ?

yacovm
2016-10-02 07:23
can you do a `ps -ef | grep docker` and tell the output?

rafael
2016-10-02 07:57
Hi All,

rafael
2016-10-02 07:59
How can I start one peer node on a host and one peer node on another host?

yacovm
2016-10-02 08:24
you need one of them to be the root peer of the other

rafael
2016-10-02 08:50
@yacovm Could give me more details?

yacovm
2016-10-02 08:51
`$ docker run --rm -it -e CORE_VM_ENDPOINT=http://172.17.0.1:2375 -e CORE_LOGGING_LEVEL=DEBUG -e CORE_PEER_ID=vp0 -e CORE_PEER_ADDRESSAUTODETECT=true hyperledger/fabric-peer peer node start` `https://github.com/hyperledger/fabric/blob/master/docs/Setup/Network-setup.md`

yacovm
2016-10-02 08:52
oh

yacovm
2016-10-02 08:52
wait

yacovm
2016-10-02 08:52
`docker run --rm -it -e CORE_VM_ENDPOINT=http://172.17.0.1:2375 -e CORE_PEER_ID=vp1 -e CORE_PEER_ADDRESSAUTODETECT=true -e CORE_PEER_DISCOVERY_ROOTNODE=172.17.0.2:7051 hyperledger/fabric-peer peer node start`


yacovm
2016-10-02 08:53
I hope I'm not mis-informing you

rafael
2016-10-02 08:53
For example,

yacovm
2016-10-02 08:54
you need to have the `CORE_PEER_DISCOVERY_ROOTNODE` variable reflect one of the others

rafael
2016-10-02 08:54
Host 1 has IP 192.168.0.1 and its docker's IP is 172.17.0.2 (dockerIP1)

rafael
2016-10-02 08:55
Host 2 has Ip 192.168.0.2 and its docker 's IP is 172.17.0.3(dockerIP2)

yacovm
2016-10-02 08:55
why is the docker's ip different?

yacovm
2016-10-02 08:55
the docker assigns consecutive ip addresses

yacovm
2016-10-02 08:56
in any case- then you'll need maybe to ensure there is port forwarding between the two hosts to port 7051 and give the `CORE_PEER_DISCOVERY_ROOTNODE` to be the host's ip

rafael
2016-10-02 08:59
docker run --rm -it -e CORE_VM_ENDPOINT=http://192.168.0.1:2375 -e CORE_PEER_ID=vp1 -e CORE_PEER_ADDRESSAUTODETECT=true -e CORE_PEER_DISCOVERY_ROOTNODE=192.168.0.1:7051 hyperledger/fabric-peer peer node start

rafael
2016-10-02 08:59
Do you think it correct?

yacovm
2016-10-02 09:00
no

yacovm
2016-10-02 09:00
what's the point of having the discovery rootnode as your own?

yacovm
2016-10-02 09:00
it has to be a different host than you

rafael
2016-10-02 09:05
Could give me an example?

yacovm
2016-10-02 09:10
yeah I can try

yacovm
2016-10-02 09:12
host1: 192.168.0.1: `docker run --rm -it -e CORE_VM_ENDPOINT=http://172.17.0.1:2375 -e CORE_LOGGING_LEVEL=DEBUG -e CORE_PEER_ID=vp0 -e CORE_PEER_ADDRESSAUTODETECT=true hyperledger/fabric-peer peer node start` host2: 192.168.0.2: `docker run --rm -it -e CORE_VM_ENDPOINT=http://172.17.0.1:2375 -e CORE_PEER_ID=vp1 -e CORE_PEER_ADDRESSAUTODETECT=true -e CORE_PEER_DISCOVERY_ROOTNODE=192.168.0.1:7051 hyperledger/fabric-peer peer node start` But you need to have host1 to forward tcp packets on port 7051 to 172.17.0.2

rafael
2016-10-02 09:17
I got it. I'll try it.

rafael
2016-10-02 09:17
Thank you so much.

yacovm
2016-10-02 09:18
np, if it doesn't work tell me, although I need to go buy food before the stores close else I'll end up starving

rafael
2016-10-02 09:19
see ya.

rafael
2016-10-02 09:20
I'll let you know later.


yacovm
2016-10-02 13:01
what about it

hhadass
2016-10-02 13:14
you were asking me to upload the output of `ps -ef | grep docker`

yacovm
2016-10-02 13:16
oh you still have that problem?

hhadass
2016-10-02 13:16
yup

yacovm
2016-10-02 13:17
the arguments to the dockerd are wrong

yacovm
2016-10-02 13:17
needs to listen on the ip adress 172.17.0.1:2375

hhadass
2016-10-02 13:18
how would i go about rectifying this?

yacovm
2016-10-02 13:21
`-H -H unix:///var/run/docker.sock` append this to the docker parameter configuration

yacovm
2016-10-02 13:22
replace the fd thing

hhadass
2016-10-02 13:26
at which step should i do this? when setting up the chaincode? sorry im not a docker expert :confused:

yacovm
2016-10-02 13:27
`/etc/init/docker.conf: DOCKER_OPTS="-H -H unix:///var/run/docker.sock"`

yacovm
2016-10-02 13:27
that's ok I'm not a docker expert myself

hhadass
2016-10-02 13:34
done! so should i run through the steps again in the chaincode setup?

yacovm
2016-10-02 13:34
no, restart the docker

yacovm
2016-10-02 13:34
and then ps -ef to see what changed

hhadass
2016-10-02 13:40
@hhadass uploaded a file: https://hyperledgerproject.slack.com/files/hhadass/F2JCT2XU0/pasted_image_at_2016_10_02_02_40_pm.png and commented: changed the conf file in two places, did `sudo /etc/init.d/docker restart` and i get this ouput, seems like its fd hasn't changed.

yacovm
2016-10-02 13:46
why in 2 places?

yacovm
2016-10-02 13:46
and in which

hhadass
2016-10-02 13:47
Here is my file:

yacovm
2016-10-02 13:48
please press the "+" on the left of the chat line where you type the message and upload this as a snippet

yacovm
2016-10-02 13:49
and please change this only in /etc/init/docker.conf

hhadass
2016-10-02 13:49

hhadass
2016-10-02 13:49
yep only touched that file

yacovm
2016-10-02 13:52
weird...

yacovm
2016-10-02 13:53
try killing the process and running docker via the commandline

hhadass
2016-10-02 13:56
killed the process then ran `sudo service docker start`, still the same output as above

yacovm
2016-10-02 13:56
no, I mean run it as it should run

yacovm
2016-10-02 13:57
`/usr/bin/docker daemon -H -H unix:///var/run/docker.sock`

yacovm
2016-10-02 13:58
maybe add a & in the end or something

hhadass
2016-10-02 13:59
sweet that worked!

hhadass
2016-10-02 14:00
... although unfortunately when i run `make peer-image` i still get the same issue as before

yacovm
2016-10-02 14:00
what issue

hhadass
2016-10-02 14:01
i get a `Cannot connect to the Docker daemon. Is the docker daemon running on this host?`


yacovm
2016-10-02 14:03
hmmm... yeah, I guess that's because how the image was made.

yacovm
2016-10-02 14:05
sorry, I don't know the fabric build well enough to help you without getting really deep and even then its hard via chat and I need to figure out why my unit test doesn't stop :confused: I'd suggest you ask in #fabric-dev-env , that's an env problem, people there might help you more than I can.

hhadass
2016-10-02 14:11
ok sure thanks

aliblackwell
2016-10-02 15:47
@hhadass I had the same issue and resolved it by installing docker for mac. This gives you a little whale icon in your menu bar that shows you whether docker is running or not. Didn't have to change anything else, it just started working.

hhadass
2016-10-03 06:14
@aliblackwell i see. But i'm on ubuntu, would this still work?

jamescarlyle
2016-10-03 08:49
has joined #fabric

andriian
2016-10-03 09:00
Hello, Can anyone share a knowledge regarding the Go chaincode method stub.GetCallerMetadata(). Currenly it returns zero bytes of information in both IBM Bluemix and local peer. I tried running chaincode from different users. What should I do to get current caller info (user name or roles) from the method? Or is there any other way to get that during runtime?

aliblackwell
2016-10-03 09:28
Ah @hhadass I did wonder about that. Presumably docker for mac just sets docker up and running in the background. My suggestion would be to go through the basic docker setup instructions so any daemon is definitely running, and then try again?

brianbehlendorf
2016-10-03 09:54
has joined #fabric

hhadass
2016-10-03 09:58
@aliblackwell i'll try that and let you know how it goes, thanks

alankhlim
2016-10-03 13:13
has joined #fabric

blighli
2016-10-03 14:55
has joined #fabric

andriian
2016-10-03 15:11
Hello, everyone. I've created question regarding my fabric user metadata issue in Stackoverflow. http://stackoverflow.com/questions/39834601/hyperledger-chaincode-does-not-get-current-user-metadata. Please advise if you have any experience.

larrykoved
2016-10-03 15:35
has joined #fabric

sukrith
2016-10-03 15:50
is it safe to invoke a function from a invoke function?

hgabor
2016-10-03 15:51
what kind of function? :slightly_smiling_face:

sukrith
2016-10-03 15:51
another invoke

hgabor
2016-10-03 15:51
there is an example showing how to implement such a story

hgabor
2016-10-03 15:51
chaincode invokes chaincode

hgabor
2016-10-03 15:51
I guess you want something like that, hm?

sukrith
2016-10-03 15:52
yea

sukrith
2016-10-03 15:52
essentially i want to call Invoke(…)

sukrith
2016-10-03 15:52
from an existing function in the chaincode

hgabor
2016-10-03 15:53
see this: examples/chaincode/go/chaincode_example04/chaincode_example04.go

hgabor
2016-10-03 15:53
if it turns out that it is not what you want please write me :slightly_smiling_face:

sukrith
2016-10-03 15:56
i see so exampl04 invokes example02. What if i wanted example04 to invoke example04

hgabor
2016-10-03 15:57
I am not sure that it is possible for a chaincode to call itself recursively. or if it is, I won't be sure that it is a good thing. @muralisr ?

muralisr
2016-10-03 15:58
it is possible… we do maintain stack for chaincode invoks

muralisr
2016-10-03 15:59
but its not recommended obviouly

hgabor
2016-10-03 15:59
I think the same, that it is a no-no

muralisr
2016-10-03 15:59
agreed

sukrith
2016-10-03 15:59
i mean it depends on the application but okay il try to avoid it

muralisr
2016-10-03 16:00
key is this

muralisr
2016-10-03 16:00
as opposed to generic programming, there is the notion of the state key vars for the chaincode

muralisr
2016-10-03 16:01
as the chaincode clearly can access its own state, there is no need to implement it via recursion

muralisr
2016-10-03 16:01
it may be convenient but it is more expensive for obvious reasons

wangbin767
2016-10-03 17:39
hi guys, I would like to know is there any instruction on how to deploy the fabric peer on different servers? I have read the Fabric Network Setup and related sections on the http://hyperledger-fabric.readthedocs.io but still have no idea.

ghaskins
2016-10-03 19:41
@ry: ping

wangbin767
2016-10-03 20:06
when I deploy the fabric on two vms , it always show the errorError handling message: Peer FSM failed while handling message (DISC_HELLO): current state: created, error: transition canceled with error: Error registering Handler: Duplicate Handler error: {name:"vp1" 172.17.0.3:7051 VALIDATOR }

wangbin767
2016-10-03 20:06
could anyone help, thanks in advance!

thiruworkspace
2016-10-03 21:01
@thiruworkspace pinned a message to this channel.

ry
2016-10-04 01:35
@ghaskins: yes?

ghaskins
2016-10-04 01:35
hey ry, i dont even remember why I was pinging in that particular instance, heh

ghaskins
2016-10-04 01:36
though @cbf and I ran into a curious issue on the v0.6 branch that we should probably explore at some point

ghaskins
2016-10-04 01:36
but not tonight, too tired

ry
2016-10-04 01:36
Ok. Shoot me an email, I'll be offline after today until next Monday

ghaskins
2016-10-04 01:37
ok

pdulong
2016-10-04 04:03
has joined #fabric

ranjan008
2016-10-04 04:58
@muralisr i am trying to make peer after i switched of my system yesterday it is giving me this error An error occurred trying to connect: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.24/build?buildargs=%7B%7D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&rm=1&shmsize=0&t=hyperledger%2Ffabric-src&ulimits=null: write unix @->/var/run/docker.sock: write: broken pipe

wangbin767
2016-10-04 06:25
Hi guys, I have deploy the fabric on two VMs with docker, and these two VMs have their own public ip. Could anyone help me on how to setup the CORE_PEER_ENDPOINT,CORE_PEER_DISCOVERY_ROOTNODE, and other related parameters? I have tried the configuration in the guide but all of that is the configuration for the peer running in the same docker with ip like 172.16.0.x. And after I deploy it in different VMs, it not working anymore.

ledger
2016-10-04 08:16
has joined #fabric

john.mccloskey
2016-10-04 14:05
has joined #fabric

yuki.k
2016-10-04 16:53
Fabric-baseimage has been fixed and Ubuntu version has been updated from 14.04 to 16.04. https://gerrit.hyperledger.org/r/#/c/1417/ We can use rocksdb package at Ubuntu 16.04 to reduce building time. The setup script (scripts/common/setup.sh) still compiles rocksdb. Can I change this step to apt-get install command?

ghaskins
2016-10-04 16:55
@yuki.k I didn’t realize rocksdb was included in 16.04

ghaskins
2016-10-04 16:55
do you know what version they are building?

ghaskins
2016-10-04 16:55
i guess I can look in launchpad

ghaskins
2016-10-04 16:57
it looks like it might be 4.1, which is good, but its only built for x86, which is ba

ghaskins
2016-10-04 16:57
bad


ghaskins
2016-10-04 16:57
the question in my mind is: why are you concerned about the build time in general?

ghaskins
2016-10-04 16:58
no one should really need to build the baseimage other than people working on the baseimage, so I am wondering why you care?

yuki.k
2016-10-04 17:59
@ghaskins Thank you for your commment. I am building Fabric outside of Vagrant. So I care about building time. If developers can avoid compiling rocksdb, it would be great!!

ghaskins
2016-10-04 18:08
i see

ghaskins
2016-10-04 18:09
i think the baseimage plumbing probably cannot adopt the ubuntu package until they solve the multi-arch problem

ghaskins
2016-10-04 18:09
but I see no problem in you consuming it

yacovm
2016-10-04 18:13
compiling rocksDB doesn't take much time...

ghaskins
2016-10-04 18:14
its about 5m in my experience, which can certainly be annoying

ghaskins
2016-10-04 18:14
but if someone is curating their own devenv, they also shouldnt need to do it very often

ghaskins
2016-10-04 18:15
@yuki.k curious why you do not use the devenv ?

vzhou
2016-10-04 18:19
@ghaskins i'm not yuki.k but in my case I needed to build from source on digital ocean droplets with 512MB memory; i tried running vagrant but it just died on me

ghaskins
2016-10-04 18:20
ah, that makes sense

ghaskins
2016-10-04 18:20
i think it tries to provision 4G ram

vzhou
2016-10-04 18:21
i dont actually need to build from source, but last week the peer and membersrvc images hadnt been updated for 2 weeks

vzhou
2016-10-04 18:21
and i wanted the latest and greatest :slightly_smiling_face:

ghaskins
2016-10-04 18:21
yes, we are no longer pushing each build, only releases

vzhou
2016-10-04 18:21
ah i see, makes sense

yacovm
2016-10-04 18:24
digital ocean droplets are dockers or something special like cloud foundry or heroku? @vzhou

yuki.k
2016-10-04 18:45
@ghaskins My host machine is Linux OS(Ubuntu). I build fabric with vagrant but I use libvirt as a hypervisor software. So I can't use the devenv directly.

ghaskins
2016-10-04 18:47
I assume you mean you run vagrant with your own Vagrantfile?

yuki.k
2016-10-04 18:57
@ghaskins As you said, I use my own Vagrantfile.

ccooper21
2016-10-04 19:04
@ghaskins This sounds related to the work I did to get the devenv deployed at AWS instead of running it locally. Though, apparently there are two flavors. 1) Running the devenv locally with an alternate VM solution to Virtualbox, and 2) Running the devenv somewhere in the cloud

ccooper21
2016-10-04 19:05
I mention the devenv as a point of reference, but it seems like even if you wanted to do a production deployment you would need to follow the same steps

nagasurya
2016-10-04 19:42
has joined #fabric

markparz
2016-10-04 20:15
Hi everyone, If you are looking for help to navigate Jira and see what the current prioritized list is for fabric at least from my view, please see the #requirements channel. I ask if there is something in your mind that is out of priority order, or simply missing in the near term, please bring it up in the #requirements slack channel. I’m working to keep the list in order as best I can, but need your feedback as well to help rank these.

wangbin767
2016-10-05 02:48
Is there anyone can help on my issue? thanks in advance!

ccooper21
2016-10-05 04:48
@wangbin767 I'm just guessing here, but if I wanted to setup a peer network with multiple computers or VMs I would run one peer per node/computer and potentially setup Nginx to reverse proxy traffic from the VMs network interface to the internal Docker interface.

wangbin767
2016-10-05 04:50
@ccooper21 thanks, I have tried only start one peer per VMs, it seems the peer can find each other, but it always report “duplicate” error in the log.

ccooper21
2016-10-05 04:50
are you giving each peer a unique name?

wangbin767
2016-10-05 05:44
yes,the detailed error message is Peer FSM failed while handling message (DISC_HELLO): current state: created, error: transition canceled with error: Error registering Handler: Duplicate Handler error: {name:"vp1" 172.17.0.3:7051 VALIDATOR }

wangbin767
2016-10-05 05:45
the name is different on each peer, but the ip address seems the same

wangbin767
2016-10-05 05:49
I have started two peer on two VMs and both of these peer’s ip is 172.17.0.2. I have tried to setup the CORE_PEER_ADDRESS,it can changed the ip of the peers but the same error still exist.

ccooper21
2016-10-05 08:17
@wangbin767 I guess that makes sense that if multiple peers have the same IP address it may cause confusion. The 172.17.0.0/12 network I believe is just an internal Docker nextwork within your host. There must be a way to change the network, but I don't know Docker well enough to know where that is controlled.

ccooper21
2016-10-05 08:20
Maybe the real answer is that in production mode there is no need/reason to run the peer inside a docker container (just the chaincode, which happens automatically). I'm also not sure how you set that up though.

wangbin767
2016-10-05 08:27
I think with the docker it make the deploy of the fabric more easy on different machine and VMs.

thomas.marckx
2016-10-05 08:29
What are the different json structures that can be returned by the fabric? According to the `fabric.proto` a Block structure looks like this: ```message Block { uint32 version = 1; google.protobuf.Timestamp timestamp = 2; repeated Transaction transactions = 3; bytes stateHash = 4; bytes previousBlockHash = 5; bytes consensusMetadata = 6; NonHashData nonHashData = 7; }``` But when I request the block number 1 it looks like this: ``` { "previousBlockHash": "RrndKwuojRMjOz/rdD7rJD/NUupiuBuCtQwnZG7Vdi/XXcTd2MDyAMsFAZ1ntZL2/IIcSUeatIZAKS6ss7fEvg==" "nonHashData": { "localLedgerCommitTimestamp": { "seconds": 1475655114 "nanos": 576500533 } "chaincodeEvents": [1] 0: {} } } ``` There’s no transactions clause … not even an empty one. Can this be expected? and why don’t have all the blocks the same structure?

garisingh
2016-10-05 08:31
there are several things that you'll need to do if you want to allow Docker containers on different machines to communicate. I won't get into overlay networking because it is probably overkill for what you want to do here. Assuming you are running one peer per machine/VM, you should start the peer container on each host with the `--net=host` option . You'll then want to configure the `CORE_PEER_DISCOVERY_ROOTNODE` to be the host ip address of at least one of the machine (host ip meaning not the docker bridge address but rather than IP that other machines can connect to you with)

garisingh
2016-10-05 08:33
for safety sake, you can also configure the `CORE_PEER_LISTEN_ADDRESS` and/or `CORE_PEER_ADDRESS` to be [machine ip]:7051 as well

garisingh
2016-10-05 08:34
do this on each machine

ccooper21
2016-10-05 08:41
I was just looking at the following. It may be helpful in getting the `--net=host` option working.


wangbin767
2016-10-05 08:45
thanks @garisingh and @ccooper21 ! I will take a try on this solution.

rafael
2016-10-05 09:16
Hi All,

rafael
2016-10-05 09:17
I am setting up enviroment to build the fabric outsoide vagrant.


rafael
2016-10-05 09:18
After installing docker, I stop docker and edit file /etc/defaut/docker with options -H -H unix:///var/run/docker.sock.

rafael
2016-10-05 09:19
DOCKER_OPTS="-H -H unix:///var/run/docker.sock"

rafael
2016-10-05 09:20
Then I start docker.

rafael
2016-10-05 09:20
After that, every time I issue a command of docker I get a message:


rafael
2016-10-05 09:42
Anyone can help?

garisingh
2016-10-05 11:15
you need to run the command as root and/or add your userid to the docker group

garisingh
2016-10-05 11:15
(assuming you are running on a Unix system)

garisingh
2016-10-05 11:16
try running `docker info` and if it fails run `sudo docker info` - if that succeeds what I wrote above is the issue

rafael
2016-10-05 14:01
I tried it. But it was unsuccessful.

rafael
2016-10-05 14:03
Actually, I run `sudo rm -rf /var/lib/docker` and it worked.

stevenroose
2016-10-05 14:26
has joined #fabric

moh.maher
2016-10-05 15:09
has joined #fabric

rafael
2016-10-05 15:16
Hi All,

rafael
2016-10-05 15:16
I am building the fabric outside of vagrant.

rafael
2016-10-05 15:17
When I run `make peer`, I get this error

rafael
2016-10-05 15:18

bfuentes
2016-10-05 15:20
Does anyone have successfully run an hyperledger image in Bluemix container ?

bfuentes
2016-10-05 15:32
It always shutdown with no logs. Is the 2GB RAM limit a problem ?

bfuentes
2016-10-05 15:33
i deploy like this :

bfuentes
2016-10-05 15:33
cf ic build -t http://registry.ng.bluemix.net/myhyperledger/hyperledger /usr/local/go/src/github.com/hyperledger/fabric/build/image/javaenv/

ghaskins
2016-10-05 15:36
@rafael what do you get when you run “ls $GOPATH/src/github.com/hyperledger/fabric” in the same shell as the “make peer"

ghaskins
2016-10-05 15:36
?

rafael
2016-10-05 15:42
@ghaskins I get this `ls: cannot access /opt/gopath/src/github.com/hyperledger/fabric: No such file or directory`

yacovm
2016-10-05 15:51
are you using the vagrant image?

yacovm
2016-10-05 15:51
this sounds weird

rafael
2016-10-05 15:52
I know the problem. I made a wrong directory.

rafael
2016-10-05 15:52
@ghaskins thanks.

ghaskins
2016-10-05 16:02
@rafael yw

ghaskins
2016-10-05 16:02
@yacovm @rafael was using a custom environment

jsalvachua
2016-10-05 16:50
has joined #fabric

wangbin767
2016-10-05 17:53
I have successfully deployed the fabric on docker, thanks @ccooper21 @garisingh . but now I encountered another problem. I find that I cannot query the chaincode successfully.

wangbin767
2016-10-05 17:54
I have deploy the chaincode ,and invoke it following the guide

ghaskins
2016-10-05 17:54
@wangbin767 im just spitballing, but I am guessing that you might be hitting the same issue we just dealt with @lenh

lenh
2016-10-05 17:54
has joined #fabric

ghaskins
2016-10-05 17:55
that is, your chaincode might not have actually deployed properly

ghaskins
2016-10-05 17:55
can you provide your peer log from the time period between the deploy and the query that is failing?

wangbin767
2016-10-05 17:58
OK, just a moment

ghaskins
2016-10-05 18:00

ghaskins
2016-10-05 18:00
basic PetSet deployment working in Origin v1.3.0

wangbin767
2016-10-05 18:12
do i need to start the peer with CORE_LOGGING_LEVEL=debug? because i cannot see anything in the peer node console

wangbin767
2016-10-05 18:24
I found there is an error when I deploy the blockchain

wangbin767
2016-10-05 18:24
vp0_1 | 18:22:21.365 [peer] ensureConnected -> DEBU 40d Discovery knows about: [13.75.124.157:7051] vp0_1 | 18:22:22.304 [dockercontroller] deployImage -> ERRO 40e Error building images: Tag latest not found in repository http://docker.io/hyperledger/fabric-baseimage vp0_1 | 18:22:22.304 [dockercontroller] deployImage -> ERRO 40f Image Output: vp0_1 | ******************** vp0_1 | Step 1 : FROM hyperledger/fabric-baseimage vp0_1 | Pulling repository http://docker.io/hyperledger/fabric-baseimage vp0_1 | vp0_1 | ******************** vp0_1 | 18:22:22.304 [container] unlockContainer -> DEBU 410 container lock deleted(dev-vp0-4ea4051e1702b1086da6aad02ac43cdf331050c9791c98356c0daff5c2516267367c3e75fca9c08f5474cc86f78e775726bd27b0d294cb218c2bb93a92aa9242) vp0_1 | 18:22:22.304 [chaincode] Launch -> ERRO 411 launchAndWaitForRegister failed Error starting container: Tag latest not found in repository http://docker.io/hyperledger/fabric-baseimage vp0_1 | 18:22:22.304 [state] TxFinish -> DEBU 412 txFinish() for txId [4ea4051e1702b1086da6aad02ac43cdf331050c9791c98356c0daff5c2516267367c3e75fca9c08f5474cc86f78e775726bd27b0d294cb218c2bb93a92aa9242], txSuccessful=[false] vp0_1 | 18:22:22.304 [state] GetHash -> DEBU 413 Enter - GetHash() vp0_1 | 18:22:22.304 [buckettree] ComputeCryptoHash -> DEBU 414 Enter - ComputeCryptoHash() vp0_1 | 18:22:22.304 [buckettree] ComputeCryptoHash -> DEBU 415 Returing existing crypto-hash as recomputation not required vp0_1 | 18:22:22.304 [state] GetHash -> DEBU 416 Exit - GetHash() vp0_1 | 18:22:22.304 [consensus/noops] processTransactions -> DEBU 417 Committing TX batch with timestamp: seconds:1475691724 nanos:25282953 vp0_1 | 18:22:22.321 [state] GetHash -> DEBU 418 Enter - GetHash() vp0_1 | 18:22:22.321 [buckettree] ComputeCryptoHash -> DEBU 419 Enter - ComputeCryptoHash() vp0_1 | 18:22:22.321 [buckettree] ComputeCryptoHash -> DEBU 41a Returing existing crypto-hash as recomputation not required vp0_1 | 18:22:22.321 [state] GetHash -> DEBU 41b Exit - GetHash() vp0_1 | 18:22:22.322 [indexes] addIndexDataForPersistence -> DEBU 41c Indexing block number [1] by hash = [ed7c72c953c5ce69e717cc4b7ee72429aa94a55f0c3f67ee3fbdcefa4ac4b2038bf7e3b8313c793e336c930f4b8933aea250f86479187dac0524781973db97da]

wangbin767
2016-10-05 18:24
here is the error part of the log

wangbin767
2016-10-05 18:26
since the complete log is too long if I paste it from the timestamp I send the request to I got the response from the peer. I only paste the error part

dtonelli
2016-10-05 18:38
has joined #fabric

niubwang
2016-10-05 21:22
when i run peer in docker, like this: docker run --rm -it -p "3066:3066" -e CORE_VM_ENDPOINT=http://192.168.42.1:2375 -e CORE_PEER_ADDRESS="host_address:3066" .... hyperledger/fabric-peer peer node start the other peers can't connect to this peer use the "host_address:3066", who can help me?

ccooper21
2016-10-06 04:17
@wangbin767 I ran into the same problem a few days ago and was given the suggestion to rebuild my environment. Apparently there was some problem with the snapshot of the code I was using. All was better after refreshing the code. As a workaround though, I think you can locally create a "latest" Docker tag for the "fabric-baseimage" container

ccooper21
2016-10-06 04:18
I pulled the code that had a problem about 2 weeks ago from today, and I pulled the working code about a week ago from today if that helps.

ccooper21
2016-10-06 04:20
@niubwang I'm still learning my way around Docker so this is kind of a guess, but I would try connecting to one of the containers hosting the "peer" and look at the interfaces/routes that are available (e.g. use "ifconfig"). If your containers are only communicating on the 172.17.0.0/12 network then it makes sense they can't see the host address.

ibmamnt
2016-10-06 04:41
I have not checked this thread for a long time, sorry if I missed the announcement. Quick question, Is "update of chaincode" to existing Docker image or create the image with the same name supported now ?

ccooper21
2016-10-06 07:12
@ibmamnt I'm not sure I'm fully understanding your question, but I believe a new Docker images is built each time you deploy chaincode. Since chaincode (and hence the corresponding image) is identified by a hash code (at least in production mode) there is no updating of previously built images

ibmamnt
2016-10-06 07:15
Right, that what I thought. Suppose I frequently change the chaincode, say 3 times / per day, and service team needs the feature right away on the same day, I need to deploy 3 chaincode / day

ibmamnt
2016-10-06 07:16
And project last for 100 days. And there are 4 peers.

ibmamnt
2016-10-06 07:16
This means we need to have 3*100*4 = 1200 Docker images.

ibmamnt
2016-10-06 07:18
On docker images have 1Gbyte, so probably we need 1.2T byte disk. This is what I think the problem.

ibmamnt
2016-10-06 07:18
In stead of having 1200 images, I just want to have 4 latest image only.

ibmamnt
2016-10-06 07:19
Note that I have no access to VMs which host peers.

garisingh
2016-10-06 07:28
@ibmamnt - chaincode lifecycle support will not be coming until v1.0 (by this I mean the ability to "upgrade" existing chaincode)

ibmamnt
2016-10-06 07:31
Oh, I understood. That is sad news... I'll over come somehow.

garisingh
2016-10-06 07:36
Agree - it is sad news, but as it requires some fairly deep changes, we opted to push to the next major release. Not that this is supported, but you could probably deal with this via interactions with the Docker endpoints on each host running chaincode - meaning you could build updated chaincode images outside of the fabric, leverage the same image name, push that to a private Docker registry, then pull from that registry on each host running chaincode, kill the existing containers and then when fabric recreates the container (since it would be gone) in theory you would be running the updated chaincode

garisingh
2016-10-06 07:36
but that of course means you need to control / have access to all nodes running the peers / chaincode

ccooper21
2016-10-06 07:49
@garisingh When you say chaincode lifeycle management will be coming in v1.0, is there documentation anywhere describing thoughts on how this might be achieved? Or is it just on a punch list of things that need to get done?

garisingh
2016-10-06 08:02
@ccooper21 - https://jira.hyperledger.org/browse/FAB-22 tracks the list of items related to chaincode management. @muralisr - is there a doc somewhere which describes the lifecycle design?

bfuentes
2016-10-06 08:19
@wangbin767 @ghaskins I will come back to you today after my meeting right now. I trying to deploy the java docker image. Maybe is different ... see you later . Thx guyz

sadanandu
2016-10-06 08:28
has joined #fabric

sadanandu
2016-10-06 08:28
Hi, I am trying to setup chaincode developer env by following http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Chaincode-setup/ . I am on a windows 7 machine and using vagrant vm i.e. using option. I am not able to start peer and facing some issue. I have also asked a question regarding this at http://stackoverflow.com/questions/39865384/is-my-hyperledger-peer-make-successful . Can some one please help me out here?

madhavi
2016-10-06 12:55
has joined #fabric

tuand
2016-10-06 12:57
@madhavi as you were saying

tuand
2016-10-06 12:58
you start 2 peers, which consensus protocol did you set ? noop or pbft ?

madhavi
2016-10-06 12:58
pbft

tuand
2016-10-06 12:59
what values for N and f in the pbft/config.yaml file ? pbft minimally should have 4 peers running

madhavi
2016-10-06 13:00
N = 4 and f = 1

tuand
2016-10-06 13:02
ok, try running with 4 peers vp0,vp1,vp2,vp3 ...

tuand
2016-10-06 13:02
2 peers is not enough for pbft to get to a quorum

madhavi
2016-10-06 13:03
k thq

madhavi
2016-10-06 13:04
while running peers CORE_PEER_DISCOVERY_ROOTNODE need to define for all 4 peers?

tuand
2016-10-06 13:07
suggest you look at some of the docker-compose yml files in the hyperledger/fabric/bddtests/bdd-docker directory ... those show what config values should be set for a 4 peer environment

madhavi
2016-10-06 13:08
k @tuand thq:slightly_smiling_face:

tuand
2016-10-06 13:08
np ! good luck

ghaskins
2016-10-06 13:39
@garisingh is there any interest in sharing my kubernetes config once I get it polished up?

lenh
2016-10-06 13:57
@sadanandu - I've replied to your question on stackoverflow... If you don't come right PM me - I'm also on Windows and it can be a little tricky...

hnattila
2016-10-06 14:04
has joined #fabric

garisingh
2016-10-06 14:21
@ghaskins - definitely - let's figure out the best way for us to keep either a folder (or repo) for various deployment configs - kub, swarm, compose, etc

ghaskins
2016-10-06 14:29
@garisingh are you guys deploying multi-node vps in bluemix against v0.6?

garisingh
2016-10-06 14:48
@ghaskins - not yet - bluemix production is still running multi-node v0.5 vps at this point. we are running them in our test environment though. we want to update to v0.6 nodes in early Nov

ghaskins
2016-10-06 14:49
im having trouble getting the vps to connect to one another, i am wondering if its my kubernetes setup or a problem in v0.6 in general

ghaskins
2016-10-06 14:49
i would assume the former

ghaskins
2016-10-06 14:49
right now, my setup is similar to “docker-compose-3”, which I presume works if run natively in compose

ghaskins
2016-10-06 14:50
i was asking because I was curious if you knew compose-3 worked

ghaskins
2016-10-06 14:50
(against v0.6.0-preview in dockerhub, that is

bfuentes
2016-10-06 14:57
I am trying to make the 0.6 working on Bluemix container. Peer starts, java chaincode deploys, but when querying, i got an error :

bfuentes
2016-10-06 14:57
14:55:10.012 [dockercontroller] deployImage -> ERRO 146 Error building images: Post http://172.17.0.1:2375/build?t=dev-vp0-05060fa11994a1a50012b4147b5abde282e54d518d7f0d907544e3b68366eae063836d0b0b66e5225516f22f02f07171e96552ae5c76c526c882236d59962ccd: dial tcp 172.17.0.1:2375: i/o timeout O14:55:10.012 [dockercontroller] deployImage -> ERRO 147 Image Output: ******************** ********************

bfuentes
2016-10-06 14:58
my cmd is : cf ic run -p 7050/tcp -m 2048 --name vp0 -it -e CORE_VM_ENDPOINT=http://172.17.0.1:2375 -e CORE_LOGGING_LEVEL=DEBUG -e CORE_PEER_ID=vp0 -e CORE_PEER_ADDRESSAUTODETECT=true myhyperledger/fabric-peer peer node start

bfuentes
2016-10-06 15:10
then is cleaning, stopping and removing the java chaincode container inside

bfuentes
2016-10-06 15:10
oO

bfuentes
2016-10-06 15:11
then i tries again :

bfuentes
2016-10-06 15:11

bfuentes
2016-10-06 15:12
@garisingh @cbf any idea of this "dial tcp 172.17.0.1:2375: i/o timeout" running on Bluemix IBM containers ?

bfuentes
2016-10-06 15:12
Do I need to change for another ENDPOINT IP ?

c0rwin
2016-10-06 15:21
Recently I’ve switched to MacOS Sierra and starting to get this warning while building my code ```# http://github.com/hyperledger/fabric/vendor/github.com/mattn/go-sqlite3 In file included from ../../vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c:2: ../../vendor/github.com/mattn/go-sqlite3/code/sqlite3-binding.c:16475:17: warning: 'OSAtomicCompareAndSwapPtrBarrier' is deprecated: first deprecated in macOS 10.12 - Use atomic_compare_exchange_strong() from <stdatomic.h> instead [-Wdeprecated-declarations] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libkern/OSAtomicDeprecated.h:547:6: note: 'OSAtomicCompareAndSwapPtrBarrier' has been explicitly marked deprecated here FAIL http://github.com/hyperledger/fabric/gossip/state [build failed] ``` Has anyone seen it? Is there known solution for that?

c0rwin
2016-10-06 15:22
Additionally I’m getting this error, which I’m not sure how to solve: ```# http://github.com/hyperledger/fabric/vendor/github.com/tecbot/gorocksdb ../../vendor/github.com/tecbot/gorocksdb/backup.go:4:11: fatal error: 'rocksdb/c.h' file not found #include "rocksdb/c.h" ^ 1 error generated. ```

c0rwin
2016-10-06 15:23
^^^ any help will be greatly appreciated.

ghaskins
2016-10-06 15:23
@c0rwin havent tried sierra yet, but I do know the build in general

ghaskins
2016-10-06 15:24
first question: are you building in vagrant devenv, or somewhere else (like native on sierra)

yacovm
2016-10-06 15:24
he's building on native

ghaskins
2016-10-06 15:24
ok…I cant speak to the sqlite issue, but the rocksdb issue sounds like you either dont have rocksdb installed, or you dont have CGO envvars set properly

mart0nix
2016-10-06 15:25
GO_CFLAGS="-I/usr/local/Cellar/rocksdb/4.9/include" CGO_LDFLAGS="-L/usr/local/Cellar/rocksdb/4.9/lib -L/usr/local/Cellar/snappy/1.1.3/lib -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy"

mart0nix
2016-10-06 15:25
this works for me

mart0nix
2016-10-06 15:25
on Mac

ghaskins
2016-10-06 15:25
ty @mart0nix, that looks good

ghaskins
2016-10-06 15:25
@c0rwin that rocksdb/c.h thing usually comes up when your envvars arent set right

ghaskins
2016-10-06 15:26
so I would start there, @mart0nix provides a good base set

ghaskins
2016-10-06 15:26
of course, YMMV on the actual paths

agunde
2016-10-06 15:26
has joined #fabric

c0rwin
2016-10-06 15:27
@ghaskins, @mart0nix thanks, I’ve changed flags or env on my laptop, while I guess upgrade might have messed something

c0rwin
2016-10-06 15:27
I will take a look on your suggestions and check them later

ghaskins
2016-10-06 15:27
yeah, you might need to brew-update, or whatever you are using to install rocksdb

ghaskins
2016-10-06 15:28
if you cant sort it out, just post back

c0rwin
2016-10-06 15:28
@ghaskins that was the first thing I did

ghaskins
2016-10-06 15:28
and let us know about the sqlite thing if it persists

c0rwin
2016-10-06 15:28
apparently w/ no success though

ghaskins
2016-10-06 15:28
ultimately it seems like your -L flag isnt right, so start there

c0rwin
2016-10-06 15:28
sure, I need to go, but will give it a try latter

ghaskins
2016-10-06 15:29
sorry, your -I

c0rwin
2016-10-06 15:29
:slightly_smiling_face: yeah, got it

c0rwin
2016-10-06 15:29
thanks again

ghaskins
2016-10-06 15:29
np

mart0nix
2016-10-06 15:32
I have a question about data modeling

mart0nix
2016-10-06 15:32
my current application would require something like 5-6 SQL tables if built on a regular web stack

bfuentes
2016-10-06 15:32
Hum ... private IP on IBM Bluemix Containers is different : Private IP: 172.32.0.15

mart0nix
2016-10-06 15:33
so I'm wondering if I should use native GO structs with embedded lists or use shim.Tables with PKs and FKs and do pseudo SQL Joins in code ?

mart0nix
2016-10-06 15:33
any suggestions in terms of what would be easier for READ/WRITE ?

mart0nix
2016-10-06 15:33
my data comes in JSON

mart0nix
2016-10-06 15:34
and I will only need to add new entries - I won't have to EDIT old ones

niubwang
2016-10-06 15:42
I have a question, i run the fabric-peer using docker toolbox in win7, but i can't deploy the chaincode, the error is : [dockercontroller] Start -> ERRO 13d start-could not recreate container Post http://unix.sock/containers/create?name=dev-vp6-b706a57c2d57f079939065f2f34160535e25febd395c3b45: dial unix /var/run/docker.sock: connect: no such fil e or directory

yacovm
2016-10-06 15:43
we really need a FAQ section somewhere with common problems and their solutions :sweat:

yacovm
2016-10-06 15:44
niubwang, you docker needs to be set up according to the dev env, are you using the vagrant image?

niubwang
2016-10-06 15:44
i am not using the vagrant

yacovm
2016-10-06 15:45
change the file accordingly: `/etc/init/docker.conf: DOCKER_OPTS="-H -H unix:///var/run/docker.sock"`

yacovm
2016-10-06 15:45
and then restart docker

mart0nix
2016-10-06 15:46
@yacovm yeah documentation is practically non-existing : ))

niubwang
2016-10-06 15:46
"/etc/init/docker.conf" on windows?

yacovm
2016-10-06 15:46
... you're using docker on windows?

niubwang
2016-10-06 15:46
yes..

yacovm
2016-10-06 15:47
oh then you need the docker to listen to that port

mart0nix
2016-10-06 15:47
how about that

mart0nix
2016-10-06 15:47
```ubuntu@ip-172-31-23-34:~/work/src/github.com/hyperledger/fabric/membersrvc$ go build # http://github.com/hyperledger/fabric/vendor/github.com/tecbot/gorocksdb could not determine kind of name for C.rocksdb_options_set_expanded_compaction_factor could not determine kind of name for C.rocksdb_options_set_max_grandparent_overlap_factor could not determine kind of name for C.rocksdb_options_set_source_compaction_factor ```

yacovm
2016-10-06 15:47
I've no idea what to do and how to do that on windows, I consider docker + windows something inherently unholy :slightly_smiling_face:

niubwang
2016-10-06 15:51
thanks yacovm, but i really can't find the way to set the docker_opts on windows

niubwang
2016-10-06 15:52
anyone can help me ? does the fabric-peer can deploy chaincode using docker toolbox on widows 7?

yacovm
2016-10-06 15:53
Why not simply use the vagrant image?

yacovm
2016-10-06 15:53
Just curious

niubwang
2016-10-06 15:57
i think it is complex to use the vagrant

niubwang
2016-10-06 16:05
@tuand hi, do you know the fabric-peer can deploy chaincode using docker toolbox on windows7? not the vagrant

niubwang
2016-10-06 16:05
\

niubwang
2016-10-06 16:06
when i do this, it can't create the chaincode container

ghaskins
2016-10-06 16:53
@niubwang can you provide more details on "i think it is complex to use the vagrant"

ghaskins
2016-10-06 16:53
in my mind, it is precisely the opposite

ghaskins
2016-10-06 16:53
cd devenv && vagrant up

ghaskins
2016-10-06 16:53
done

ghaskins
2016-10-06 16:54
the challenge is typically when someone has limitations for VMX/vbox, but i’ve never heard that it was too complex

adrianhopebailie
2016-10-06 17:11
has joined #fabric

ghaskins
2016-10-06 17:32
@ghaskins uploaded a file: https://hyperledgerproject.slack.com/files/ghaskins/F2L81MJP5/-.txt and commented: Any help with best strategy to try to debug what is wrong here would be appreciated

ghaskins
2016-10-06 17:33
To be clear: this is running against a private build with ubuntu updated to 16.04, not something we have committed

ghaskins
2016-10-06 17:33
but I am at a loss…the docker images themselves seem ok

ghaskins
2016-10-06 17:33
e.g. I can manually launch membersrvc and peer via “docker run” incantations

ghaskins
2016-10-06 17:33
but when its composed, it seems that the peer cannot see the CA

ghaskins
2016-10-06 17:34
I did confirm basic things, like the CA really is running at the specified $IP, etc

tuand
2016-10-06 18:06
@niubwang sorry, I'm using vagrant on win7

mrshah
2016-10-06 18:13
@mrshah shared a file: https://hyperledgerproject.slack.com/files/ghaskins/F2L81MJP5/-.txt and commented: Any help with best strategy to try to debug what is wrong here would be appreciated

2016-10-06 18:13
@mrshah commented on @ghaskins’s file https://hyperledgerproject.slack.com/files/ghaskins/F2L81MJP5/-.txt: @ghaskins I saw exactly the same thing.. worked for me after a machine reboot

ghaskins
2016-10-06 18:15
@mrshah ty for the info, but this was a clean install

ghaskins
2016-10-06 18:16
and its consistent….it seems there is something in the 16.04 setup that is breaking this

ghaskins
2016-10-06 18:18
this is really bizarre…i think its the wait-for script that is broken

ghaskins
2016-10-06 18:19
maybe there is a utility it is using that isnt installed

garisingh
2016-10-06 18:19
@ghaskins - is this both Vagrant and the Docker images using Ubuntu 16.04

ghaskins
2016-10-06 18:19
@garisingh yeah, full rebuild of both with my prerelease v0.2.0 baseimage

ghaskins
2016-10-06 18:19
i bet the wait for script is calling something that isnt installed on 16.04 by default

ghaskins
2016-10-06 18:19
because I can netcat the CA while the compose runs and they are talking to each other

ghaskins
2016-10-06 18:22
i think its netcat

mrshah
2016-10-06 18:25
@ghaskins I spent a lot of time today trying to figure this out. Initially everything started fine, suddenly I ended up in this issue and it would never start. Spent a lot of time investigating -> finally a reboot and it worked. I will stay tuned if you find something, while I try to look into it too

ghaskins
2016-10-06 18:26
@mrshah ok, but I think its likely unrelated

ghaskins
2016-10-06 18:26
im upgrading the core platform, i think thats what broke it in my case

mrshah
2016-10-06 18:27
no problem

ghaskins
2016-10-06 18:32
@mrshah that said, if you are seeing flakiness, we want to know about it

ghaskins
2016-10-06 18:32
so let us know if that pops up again

mrshah
2016-10-06 18:32
sure, will do

mrshah
2016-10-06 18:38
I was trying it on `Ubuntu 16.04.1 LTS` and I saw exactly the same issue where peers couldn't reach the membersrvc. So I added a debug container in docker-compose by running bash and linking it to membersrvc. I couldn't telnet or nc -z to membersrvc on port 7054 from the debug container. I will let you know if it happens again and other debug info that I find

muralisr
2016-10-06 19:23
@ghaskins @mrshah don’t want to mislead but this error could be relevant and something you are running into here ? https://jenkins.hyperledger.org/job/fabric-verify-x86_64/1652/console

ghaskins
2016-10-06 20:20
@mrshah ah, out of curiosity, did you mean up updated the images like fabric-membersrvc to use 16.04?

ghaskins
2016-10-06 20:20
or just that you were executing on 16.04?

mrshah
2016-10-06 20:25
@ghaskins I was just executing on 16.04 and pulled the images on hyperledger/fabric

ghaskins
2016-10-06 20:27
i see, I dont suspect it was the same problem

ghaskins
2016-10-06 20:27
this particular problem I was chasing was specific to 16.04 within the fabric images


vigneswaran.r
2016-10-07 04:38
has joined #fabric

sahitya.pavurala
2016-10-07 04:46
has joined #fabric

jmahhh
2016-10-07 05:28
has joined #fabric

madhavi
2016-10-07 06:18
Hi.. I was trying to deploy a chaincode in one peer and its deployed and in the other peer its is showing --sending init failed(handler not found for chaincode example01)

madhavi
2016-10-07 06:58
??

abhisingh
2016-10-07 07:00
has joined #fabric

vinayak
2016-10-07 07:14
has joined #fabric

ibmamnt
2016-10-07 07:32
Hi, I'm running chaincode_example04 (on v0.5.0-developer-preview version). When I turn on security, I got ```Failed to invoke chaincode. Got error: Could not get deployment transaction for a5389f7dfb9efae379900a41db1503fea2199fe400272b61ac5fe7bd0c6b97cf10ce3aa8dd00cd7626ce02f18accc7e5f2059dae6eb0786838042958352b89fb - LedgerError - ResourceNotFound: ledger: resource not foundError starting Simple chaincode: Error handling message: [0b465edc-e0b6-42bc-ba34-175b3b41700d]Chaincode handler FSM cannot handle message (ERROR) with payload size (269) while in state: ready```

ibmamnt
2016-10-07 07:33
What's the possible cause ?

abhisingh
2016-10-07 07:34
Hi.. While doing make peer command i am getting this error... root@localhost:/opt/gopath/src/github.com/hyperledger/fabric# make peer build/bin/peer CGO_CFLAGS=" " CGO_LDFLAGS="-lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy" GOBIN=/opt/gopath/src/github.com/hyperledger/fabric/build/bin go install -ldflags "-X http://github.com/hyperledger/fabric/metadata.Version=0.7.0-snapshot-448d207" http://github.com/hyperledger/fabric/peer core/admin.go:27:2: cannot find package "http://github.com/golang/protobuf/ptypes/empty" in any of: /usr/local/go/src/pkg/github.com/golang/protobuf/ptypes/empty (from $GOROOT) /opt/gopath/src/github.com/golang/protobuf/ptypes/empty (from $GOPATH) core/util/utils.go:28:2: cannot find package "http://github.com/golang/protobuf/ptypes/timestamp" in any of: /usr/local/go/src/pkg/github.com/golang/protobuf/ptypes/timestamp (from $GOROOT) /opt/gopath/src/github.com/golang/protobuf/ptypes/timestamp (from $GOPATH) make: *** [build/bin/peer] Error 1

abhisingh
2016-10-07 07:35

ibmamnt
2016-10-07 07:37
@abhisingh Have you build protobuf3 ?

ibmamnt
2016-10-07 07:39
If not, try run "/opt/gopath/src/github.com/hyperledger/fabric/images/base/scripts/common/setup.sh" This will install most of required packages.

oiakovlev
2016-10-07 09:54
Hi, what might be a correct channel to ask questions about member service future architectural changes? This one or some of the `-dev`s?

garisingh
2016-10-07 09:55
#membership-services

oiakovlev
2016-10-07 09:55
thnks

abhisingh
2016-10-07 10:14
Thanks @ibmamnt I will check this.

abhisingh
2016-10-07 10:16
I have one more doubt: I have deployed chaincode_example02 and successfully invoked but I am facing problem with query command

abhisingh
2016-10-07 10:16

abhisingh
2016-10-07 10:17
But this chaincode is already deployed

lenh
2016-10-07 11:05
@abhisingh - I was having similar issues - try this one -> https://github.com/ratnakar-asara/hello-blockchain

lenh
2016-10-07 11:06
it seems the node sdk fakes certain issues when things go wrong and then it "looks" like the deploy worked when in fact it did not...

lenh
2016-10-07 11:07
pull that repo and you'll see that there is a `src/chaincode` dir in which the chaincode MUST reside and also the `vendor/...` dir structure which is needed

lenh
2016-10-07 11:08
I had endless problems with example02 until @ratnakar provided me with the above which then worked like a charm and actually finally got me going.... so credit where due!

abhisingh
2016-10-07 14:11
@abhisingh uploaded a file: https://hyperledgerproject.slack.com/files/abhisingh/F2LM88084/-.txt and commented: In peer log I found this error (at the time of deploy command)

abhisingh
2016-10-07 14:13
@abhisingh uploaded a file: https://hyperledgerproject.slack.com/files/abhisingh/F2LMD9KGW/-.sh and commented: This is the whole peer log of deploy command. See line # 31 32 49 and 51

rafael
2016-10-07 17:00
Hi All,

rafael
2016-10-07 17:01
When I build the fabric outside vagrant, I get this error

rafael
2016-10-07 17:01

rafael
2016-10-07 17:01
Do you know the error?

karnn
2016-10-07 20:49
has joined #fabric

tkuhrt
2016-10-08 00:25
has joined #fabric

wangbin767
2016-10-08 10:33
Hi I found there is an error when I deploy the chaincode_example02 in docker

wangbin767
2016-10-08 10:33

wangbin767
2016-10-08 10:35
it seems there are missing of fabric-ccenv in the images, how can I fix this error?

ghaskins
2016-10-08 13:13
Build from source

ghaskins
2016-10-08 13:13
That's the only supported mode right now. We are working on the binary distribution

mart0nix
2016-10-08 13:20
guys - there's no datetime column field in the Table interface right ?

muralisr
2016-10-08 13:20
you mean as a column type ?

muralisr
2016-10-08 13:21
if so no

mart0nix
2016-10-08 13:23
yeah

mart0nix
2016-10-08 13:24
@muralisr I saw there were plans for SQL-like query support in the future

mart0nix
2016-10-08 13:24
so I'm wondering if this Table interface will become something like a SQL table with foreign keys to other tables and full support for other column types?

muralisr
2016-10-08 13:25
let me refer to @dave.enyeart

dave.enyeart
2016-10-08 13:29
The focus for now is on JSON support, to support complex objects without the more painful relational/table mapping. There are good options out there for sql-like query across JSON documents. That said, we’d like to make the data architecture pluggable so that a table metaphor could be plugged in backed by relational tables. Let me ask this - is there a specific reason you want to use a table metaphor instead of a json document metaphor?

mart0nix
2016-10-08 13:31
well a json metaphor will be ideal

mart0nix
2016-10-08 13:31
my application requires JSON(or XML) documents coming in

mart0nix
2016-10-08 13:32
I want to parse those and store them somehow in the chain so that I can query fields later

mart0nix
2016-10-08 13:32
my case is that I don't have to EDIT or DELETE old records - just add new ones and be able to query

mart0nix
2016-10-08 13:32
@dave.enyeart does that make sense ?

dave.enyeart
2016-10-08 13:34
very much makes sense. so the work that is beginning now will help you a lot - chaincode persisting json documents backed by a data store that supports json query. i am working on a proposal this weekend and will post an updated presentation, watch the fabric-ledger-dev channel for updates

mart0nix
2016-10-08 13:35
oh that would be awesome

mart0nix
2016-10-08 13:36
@dave.enyeart are you guys creating a new engine or trying to accommodate an existing DB ?

dave.enyeart
2016-10-08 13:36
excellent, will look forward to getting your detailed feedback after i post

dave.enyeart
2016-10-08 13:36
it will be pluggable, looking at couchdb as an initial data store

wangbin767
2016-10-08 13:36
@ghaskins is that means I can’t use any image pulled from docker hub?

garisingh
2016-10-08 13:40
@wangbin767 - you need to build the `fabric-ccenv` image from src but you can use all the other images from Dockerhub

garisingh
2016-10-08 13:41
you can also likely just do `docker tag hyperledger/fabric-peer:latest hyperledger/fabric-ccenv:latest` as well if working with Golang chaincode

ghaskins
2016-10-08 14:09
@wangbin767: as @garisingh said: it's not that the images there aren't usable, they just aren't complete

ghaskins
2016-10-08 14:09
I concur with @garisingh s workaround

ghaskins
2016-10-08 14:12
We are working on making a complete set available in one of the upcoming releases

wangbin767
2016-10-08 14:19
finally I have successfully run the chaincode_example02…. thanks @ghaskins and @garisingh

ghaskins
2016-10-08 14:19
Yw

wangbin767
2016-10-08 14:19

wangbin767
2016-10-08 14:20

wangbin767
2016-10-08 14:22
you have to tag the fabric-baseimage and only after that the chaincode can run correctly.

wangbin767
2016-10-08 14:24
I think somebody should amend this instruction ,add “docker tag hyperledger/base-image:latest hyperledger/fabric-peer:latest” after “docker pull hyperledger/fabric-membersrvc:latest"

2016-10-08 14:46
@abhisingh commented on @abhisingh’s file https://hyperledgerproject.slack.com/files/abhisingh/F2LMD9KGW/-.sh: Hi @ghaskins and @garisingh, Please help me to solve this problem I am facing while deploying chaincode.

garisingh
2016-10-08 17:00
@abhisingh - are you running the peer using docker-compose? can you share your compose file? if not running in Docker, can you share your core.yaml or start command used for the peer?

garisingh
2016-10-08 17:01
looks like you somehow have the wrong value for `CORE_VM_ENDPOINT`

arvin
2016-10-09 08:35
how can i rolling up chaincode?

garisingh
2016-10-09 09:07
??? - not sure I understand the question

arvin
2016-10-09 09:13
chaincode upgrade ,transactions don't be affect

arvin
2016-10-09 09:15
or chaincode upgrade ,tsn date will be retain on host

garisingh
2016-10-09 10:42
chaincode upgrade is planned for the v1.0 release but is currently not supported

wangbin767
2016-10-09 21:02
I always got this error when I query the chaincode, is there anyone know why?

wangbin767
2016-10-09 21:02
Error: Error querying chaincode: rpc error: code = 2 desc = Error:Failed to execute transaction or query(Timeout expired while executing transaction)

wangbin767
2016-10-09 21:03
But actually I can invoke the chaincode , and it returns success

muralisr
2016-10-09 21:39
@wangbin767 invokes are asynchronous. Invoke is submitted for processing and returns to user

muralisr
2016-10-09 21:41
peer logs will specify if they succeeded or not. Query timeout suggests the chaincode might have exited with error…look at chaincode logs (and peer logs) to debug

arvin
2016-10-10 01:13
@garisingh thanks

abhisingh
2016-10-10 03:53
@abhisingh uploaded a file: https://hyperledgerproject.slack.com/files/abhisingh/F2M8QJ3D2/-.txt and commented: Hi @garisingh! I am using docker-compose to run the peer. This is my docker-compose.yml file

abhisingh
2016-10-10 09:47
@abhisingh uploaded a file: https://hyperledgerproject.slack.com/files/abhisingh/F2MBG3N3C/-.txt and commented: This is my docker file.

garisingh
2016-10-10 09:52
@abhisingh - in your compose file you need to change `CORE_VM_ENDPOINT=172.17.0.1:2357` to `CORE_VM_ENDPOINT=http://172.17.0.1:2375`

abhisingh
2016-10-10 09:54
Oops... Sorry my bad.

abhisingh
2016-10-10 09:55
thanks @garisingh :slightly_smiling_face:

garisingh
2016-10-10 09:55
np. happens to the best of us

abhisingh
2016-10-10 09:58
Do you know why I was facing problem while running peers with membersrvc?

garisingh
2016-10-10 10:37
@abhisingh - sorry - what was the issue with peers with membersrvc?

abhisingh
2016-10-10 10:42

abhisingh
2016-10-10 10:42
@garisingh This is what I was facing

abhisingh
2016-10-10 10:44
"it is possible that you ran `docker-compose up`, then stopped the containers, slightly modified the yaml (perhaps changing the peer config) and then ran `docker-compose up` again?" - This was you comment.

abhisingh
2016-10-10 10:44
Actually I did the same but didn't modified the yaml file.

garisingh
2016-10-10 11:01
the only reason I can think that this would happen is that somehow something had already connected to your membersrvc container using the same ID. I've started / stopped peer and membersrv a few times using compose and the only time I got an error like that was when something (e.g. changing the YAML) forced creation of a new peer and/or membersrvc container

abhisingh
2016-10-10 11:08
Ok. Thanks :slightly_smiling_face: Let me explore this.

donovanhide
2016-10-10 20:30
Can someone give me a definition of the purpose of `CORE_VM_ENDPOINT`? I understand it is meant to point to a Docker port, but in a distributed system, should it not be unique for each peer so that they can start a chaincode instance locally? All the examples use the same address for each peer, which is confusing :slightly_smiling_face:

donovanhide
2016-10-10 20:37
Maybe I’m a bit confused by this reference to `CORE_VM_ENDPOINT`: https://github.com/OpenBlockMesh/OBM-Fabric-GKE#core_vm_endpoint-setup where there seems to be only one Docker container running the chaincode!

donovanhide
2016-10-10 20:40
Or is it multiple containers running on a single Docker instance? Confused :slightly_smiling_face:

cbf
2016-10-10 21:12
@donovanhide yes - @garisingh has been playing with a new approach using Docker in Docker where you would have a DinD container paired with a peer(s)

cbf
2016-10-10 21:13
but basically this is intended to provide the endpoint to a docker daemon that can spin up containers for the various chaincodes that are associated with a peer

donovanhide
2016-10-10 22:15
@cbf @garisingh I was going to suggest Docker in Docker :slightly_smiling_face: Glad the intention is to have a chaincode host per peer, that makes much more sense to me :slightly_smiling_face:

garisingh
2016-10-10 22:16
yep - it's just that for now, most people run all the peers on a single host just to test / simulate PBFT. And you'll notice that you could actually have the same CORE_VM_ENDPOINT on multiple hosts - it's basically binding the docker daemon to the Docker bridge address

garisingh
2016-10-10 22:17
but I've been messing with a compose config which use DinD to simplify the setup for folks.

donovanhide
2016-10-10 22:20
I’ve just been playing with getting a test rig set up on Kubernetes and was trying to work out all the yaml files and it did seem odd that all the examples were speaking to the same Docker instance. I want to test PBFT over multiple clusters, so I’d probably want at least one CORE_VM_ENDPOINT per cluster, but you soon realise that the configs can get quite out of hand and you need to stage the deployment over two or three phases. Having Docker in Docker would at least reduce that phasing by one step.

tbrooke
2016-10-10 22:29
has joined #fabric

andrearei
2016-10-10 23:18
has joined #fabric

hustdihu
2016-10-11 04:52
has joined #fabric

arvin
2016-10-11 07:26
how can i change a block store more than one transactions?

madhavi
2016-10-11 11:29
while deploying chaincode , i am getting sending init failed

madhavi
2016-10-11 11:29
[chaincode] Launch -> ERRO 01a sending init failed(handler not found for chaincode cctest)

madhavi
2016-10-11 11:29
How to resolve it?

garisingh
2016-10-11 12:04
@madhavi - are you running in chaincode dev mode?

madhavi
2016-10-11 12:04
yes

garisingh
2016-10-11 12:05
then you'll need to compile and run your chaincode locally before running the deploy transaction

garisingh
2016-10-11 12:06
from the docs: ``` Starting and registering the chaincode Run the following chaincode command to start and register the chaincode with the validating peer: CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:7051 ./chaincode_example02 The chaincode console will display the message “Received REGISTERED, ready for invocations”, which indicates that the chaincode is ready to receive requests. Follow the steps below to send a chaincode deploy, invoke or query transaction. If the “Received REGISTERED” message is not displayed, then an error has occurred during the deployment; revisit the previous steps to resolve the issue. ```

madhavi
2016-10-11 12:06
yes i did that

garisingh
2016-10-11 12:06
(as an example)

madhavi
2016-10-11 12:07
i started two peers and i deployed by using one peer and in the other peer it is giving error as sending init failed

garisingh
2016-10-11 12:07
ah - so you'll need to start another instance of the chaincode and point it at the other peer as well

madhavi
2016-10-11 12:08
start another instance is enough or need to deploy with that peer also?

vigneswaran.r
2016-10-11 12:09
starting should be enough. deploy will propagate to other peers, I suppose.

garisingh
2016-10-11 12:11
you just need to start it. deploy transaction will go to both peers

madhavi
2016-10-11 12:12
ya its working thanq:)

madhavi
2016-10-11 12:14
if it is in public mode then also we have to create multi instances of chaincode? or how it will work?

muralisr
2016-10-11 12:21
@madhavi its only in `—peer-chaincodedev` mode the user is responsible for starting and attaching chaincodes to peer. Otherwise the peer manages that for the user… also `i started two peers..` - are you running the two peers in docker container ?

madhavi
2016-10-11 12:21
yes

muralisr
2016-10-11 12:22
ok

madhavi
2016-10-11 12:23
@muralisr if we remove --peer-chaincodedev then it run as a public mode right?

vigneswaran.r
2016-10-11 12:24
@madhavi we can say "production mode"

muralisr
2016-10-11 12:25
@vigneswaran.r its perfectly ok to run without that flag and let the peer manage chaincodes even when “developing"

muralisr
2016-10-11 12:25
its main use is to be able to debug chaincode problems with quick turnaround

vigneswaran.r
2016-10-11 12:26
@muralisr Got the point.

madhavi
2016-10-11 12:27
@vigneswaran.r ya in dev mode i start two peers and i start two instances of chaincodes for each peer its working

madhavi
2016-10-11 12:28
in production mode, we need to create multi instances for chaincode? or exact it works? how multi peers can access the same chaincode which is deployed by one peer?

muralisr
2016-10-11 12:29
@madhavi it might be a good idea to do a write up of that process (people typically run only one peer `—peer-chaincodedev` mode)

muralisr
2016-10-11 12:29
the deploy transaction is sent to all peers who deploy the same chaincode

muralisr
2016-10-11 12:31
so even in your current dev mode, if you send an invoke to a peer, you should see it run on both

madhavi
2016-10-11 12:31
ok

vigneswaran.r
2016-10-11 12:35
@madhavi Regarding production mode, the following is my understanding, When you submit a deploy transaction by specifying the path of a chaincode through REST APIs, the peer reads the chaincode, compiles and creates a docker image containing the executable plus the necessary libraries, and starts the container. The same process is done by all the peers.

vigneswaran.r
2016-10-11 12:36
This is the case with CLI method too.

vigneswaran.r
2016-10-11 12:37
So, the point here is that the peer should have access to the chaincode (In case, you're trying with your custom chaincode, it should be inside the docker image where the peer started).

vigneswaran.r
2016-10-11 12:38
If you are using gRPC method (eg., app.go in asset_management example), the chaincode is read in the client side and sent to peer as payload, and the receiving peer sends to other peers and the same process of compilation, docker creation follows.

vigneswaran.r
2016-10-11 12:38
(Please feel free to correct, if I am wrong)

ghaskins
2016-10-11 12:39
@vigneswaran.r you are close

ghaskins
2016-10-11 12:40
the only nuance here is that the peer that receives the deploy (from the REST/CLI) packages the chaincode up as a payload before dissemination, same process as the GRPC/SDK

madhavi
2016-10-11 12:40
@vigneswaran.r k thanq i will try it

vigneswaran.r
2016-10-11 12:41
@ghaskins Thank you for the clarification...

ghaskins
2016-10-11 12:41
IOW, the normal peer fabric always receives a payload

ghaskins
2016-10-11 12:42
as an aside, note that when used in this manner, the receiving peer should be considered part of your client stack, not the general peer network

ghaskins
2016-10-11 12:42
that is why it would be expected to have access to your code to do the packaging, similar to how the SDK would

ghaskins
2016-10-11 12:43
typically this would be a locally deployed NVP

vigneswaran.r
2016-10-11 12:44
Ok

sandeep.kanaparthi
2016-10-11 18:23
has joined #fabric

gnsortino
2016-10-11 20:37
has joined #fabric

lhaskins
2016-10-11 20:43
A quick reminder: the ports have changed when moving from fabric v0.5 to v0.6. Be sure to take the correct actions when communicating with your fabric peers. The port mapping is: ``` v0.5 | v0.6 ------------- 5000 | 7050 30303 | 7051 50051 | 7054 31315 | 7053 ```

andrew_tharp
2016-10-11 23:23
has joined #fabric

segora
2016-10-12 08:54
has joined #fabric

ant2221
2016-10-12 08:55
@lhaskins thanks, is there anywhere with a full list of changes from v0.5 -> v0.6?

crawlem
2016-10-12 08:58
has joined #fabric

kaavya
2016-10-12 09:42
has joined #fabric

kaavya
2016-10-12 09:45
I used "peer node start --peer-chaincodedev" to start a single peer. How to start multiple peers ?

kaavya
2016-10-12 09:53
If I try to start another peer in the next terminal, I get this error message "Failed to listen: listen tcp 0.0.0.0:7051: bind: address already in use"

yacovm
2016-10-12 09:54
you need to use docker

kaavya
2016-10-12 09:58
@yacovm thank you.

kaavya
2016-10-12 12:15
how to start a non-validating peer?

adc
2016-10-12 12:17
@kaavya, you don't really need an nvp. With the client-sdk you can send transactions to the validating peers

kaavya
2016-10-12 12:20
can u please tell me what steps are needed to send transactions to validating peers?

yacovm
2016-10-12 13:01
you just use the REST API

madhavi
2016-10-12 13:03
how to make a REST API call for registering chaincode?


madhavi
2016-10-12 13:11
in CLI, we register chaincode by using CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=172.17.0.3:7051 ./chaincode_example02

madhavi
2016-10-12 13:11
in REST API, they are given for deploy, invoke and query but registering chaincode i didnt find any REST API call

lhaskins
2016-10-12 14:40
@ant2221: Here are some notes from what I have at this point: ```* port changes * Custom events * event handlers on the nodejs.sdk and quality improvements on sdk * improvements in docs * docker client upgrade to 1.12 * java chaincode shim * ability to call chaincode using 64 encoded string * consensus bug fixes * memory leak fix when chaincode crashes```

ant2221
2016-10-12 14:43
thanks @lhaskins :slightly_smiling_face: Any lists or documentation about API/HFC changes would also be rewarded with smiles

georgeo
2016-10-12 15:49
has joined #fabric

jdockter
2016-10-12 16:25
has joined #fabric

sukrith
2016-10-12 18:11
How should I properly handle errors in chaincode (using go)? so the application using HFC is notified properly. I followed IBM’s marbles demo and copied the error handling but the error does not get propagated to the response to hfc.

lhaskins
2016-10-12 21:51
@ant2221 :slightly_smiling_face: This is the only link that I have right now: https://hyperledger-fabric.readthedocs.io/en/latest/nodeSDK/node-sdk-guide/

pospi
2016-10-13 01:53
has joined #fabric

shimron
2016-10-13 02:56
has joined #fabric

zanejia
2016-10-13 03:40
has joined #fabric

c0rwin
2016-10-13 09:05
Hey, is there anyone who ran into this: ```# http://github.com/hyperledger/fabric/vendor/github.com/tecbot/gorocksdb Undefined symbols for architecture x86_64: "_rocksdb_options_set_filter_deletes", referenced from: __cgo_4c7b26b16232_Cfunc_rocksdb_options_set_filter_deletes in options.cgo2.o (maybe you meant: __cgo_4c7b26b16232_Cfunc_rocksdb_options_set_filter_deletes) "_rocksdb_options_set_memtable_prefix_bloom_bits", referenced from: __cgo_4c7b26b16232_Cfunc_rocksdb_options_set_memtable_prefix_bloom_bits in options.cgo2.o (maybe you meant: __cgo_4c7b26b16232_Cfunc_rocksdb_options_set_memtable_prefix_bloom_bits) "_rocksdb_options_set_memtable_prefix_bloom_probes", referenced from: __cgo_4c7b26b16232_Cfunc_rocksdb_options_set_memtable_prefix_bloom_probes in options.cgo2.o (maybe you meant: __cgo_4c7b26b16232_Cfunc_rocksdb_options_set_memtable_prefix_bloom_probes) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ``` I’ve updated my Mac to latest Sierra 10.12 and stated to get this error while compiling sources. PS. I have following for my env. `export CGO_CFLAGS="-I/usr/local/Cellar/rocksdb/4.11.2/include" && export CGO_LDFLAGS="-L/usr/local/Cellar/rocksdb/4.11.2/lib -L/usr/local/Cellar/snappy/1.1.3/lib -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -lgflags”`.

ant2221
2016-10-13 09:08
@lhaskins thanks, for those of us with existing apps/demos it would be great to see a breakdown of specific changes from version to version or we will end up reading the entire documentation again or debugging for hours/days

kaavya
2016-10-13 09:33
Is there a way to start a docker peer from java code?

yacovm
2016-10-13 09:36
assuming you have a docker image of a peer?

kaavya
2016-10-13 09:39
Yes I have docker images and I interact using CLI commands. Now I want to make a REST API call to docker peer using java code

kaavya
2016-10-13 09:39
Can you please help me

kaavya
2016-10-13 09:41
I used the code below

kaavya
2016-10-13 09:41
public static final Fabric FABRIC = Hyperledger.fabric("http://172.17.0.2:7050", HTTP_LOGGING_INTERCEPTOR);

kaavya
2016-10-13 09:41
FABRIC.chaincode( ChaincodeOpPayload.builder() .jsonrpc("2.0") .id(1) .method("deploy") .params( ChaincodeSpec.builder() .chaincodeID( ChaincodeID.builder() .path("http://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02") .build()) .ctorMsg( ChaincodeInput.builder() .function("init") .args(Arrays.asList(p)) .build()) .secureContext("admin") .type(ChaincodeSpec.Type.GOLANG) .build()) .build()) .subscribe(new Action1<ChaincodeOpResult>() { public void call(ChaincodeOpResult chaincodeOpResult) { System.out.printf("Deploy chaincode result:%s\n", chaincodeOpResult); } });

kaavya
2016-10-13 09:43

yacovm
2016-10-13 09:47
I don't understand, you asked how can you start a docker peer from java code but it looks like you're trying to do a deploy transactions to a peer

kaavya
2016-10-13 09:51
yes .. this is the code for deployment. I just tried it.

kaavya
2016-10-13 09:51
Cannot interact with the peer from the code shown above

kaavya
2016-10-13 09:52
Is there a way to interact or did I miss some code

madhavi
2016-10-13 11:46
Hi, while deploying chaincode using RESTAPI through java code, i am getting exception

madhavi
2016-10-13 11:46
Exception in thread "main" rx.exceptions.OnErrorNotImplementedException: connect timed out

madhavi
2016-10-13 11:46
how to resolve this exception?

lhaskins
2016-10-13 14:36
@ant2221 I totally agree :slightly_smiling_face: Hopefully moving forward, we can do a better job with this.

phyrex
2016-10-13 14:54
has joined #fabric

sergefdrv
2016-10-13 15:53
has joined #fabric

sergefdrv
2016-10-13 15:58
Hi, I just started with HLP and I'm trying to figure out quickly how the chaincode's docker container is launched from node's docker container. Can anyone point me to the right place in the code? Thanks


sergefdrv
2016-10-13 16:34
@ghaskins, thanks for helping. Sorry if I bother you, but I'm still new to golang as well. I guess that the docker container is launched at line 107. I just can't see where I can find where docker.Client.CreateContainer() comes from. I see that whenever a new chaincode is deployed there's sibling docker containers appear. But I can't how the node's docker containers communicate with the host's docker deamon to do this...

sergefdrv
2016-10-13 16:39
@ghaskins probably, that's what I'm looking for: https://github.com/fsouza/go-dockerclient/blob/master/container.go#L549

ghaskins
2016-10-13 16:42
It's via the DOCKER_OPTS environment I believe

ghaskins
2016-10-13 16:42
It points the environment to an external daemon

sergefdrv
2016-10-13 16:45
Through docker inspect I just can't see that host's /var/run/docker.sock is mapped to the node container. I don't know any other way to communicate with the host's docker deamon

sergefdrv
2016-10-13 16:47
And nothing Docker-related in Config.Env


garisingh
2016-10-13 16:53
there is a setting in core.yaml (vm.endpoint) which specifies the Docker endpoint. If you are running in Vagrant, the docker daemon is also listening on tcp port 2375 as well as on the unix socket

sergefdrv
2016-10-13 16:54
Ah, I see "CORE_VM_ENDPOINT=http://172.17.0.1:2375" is about this

garisingh
2016-10-13 16:54
you got it

sergefdrv
2016-10-13 16:54
@garisingh Thanks a lot

eddie.allen
2016-10-13 17:03
has joined #fabric

kletkeman
2016-10-13 17:26
FYI: If you have a fabric with chaincode that you suspect might be non-deterministic (or you want to run a long term test to exercise it and prove that it is not) I've whipped up a simple monitor as a node-red flow. Not a hardened app by any stretch, but it does the job and outputs a message showing the state of the hashes -- could be hooked up to any of the node-red social output nodes to get an alert on your phone etc ... https://github.com/ibm-watson-iot/blockchain-samples/tree/master/testing/node-red/fabricDivergenceMonitor

donovanhide
2016-10-13 17:33
@kletkeman Might be good to draw up some coding best practices. Something like: * Don’t range over maps. * Don’t use unseeded sources of entropy * Don’t use time.Time * ...

kletkeman
2016-10-13 17:34
@donovanhide I agree ... I've been meaning to put a FAQ together for our IoT-oriented work, but such would be useful to the whole community ...

kletkeman
2016-10-13 17:35
by the way, I range over maps all the time :slightly_smiling_face: ... but the output of that cannot be committed to world state without sorting to remove the non-determinism ...

donovanhide
2016-10-13 17:36
I’d say that at a `shim.OrderedMap`, a bit like std::map in C++ would be a useful addition :slightly_smiling_face:

kletkeman
2016-10-13 17:36
go is awesome ... but I really miss backing of hash maps with sorted trees etc

kletkeman
2016-10-13 17:36
wow ... same thought

donovanhide
2016-10-13 17:36
Great minds, lol :slightly_smiling_face:

kletkeman
2016-10-13 17:37
we make a lot of use of json objects and I use maps internally, so I am thankful that the marshaller sorts keys by default ...

donovanhide
2016-10-13 17:37
Yep, encoding/json provides canonical output.

pushpalatha
2016-10-14 05:55
Hi All I am trying the execution using nodeSDK for the first time. Even after adding all he vendor dependencies and all, i get the following error, vp0_1 | src/build-chaincode/service-test.go:12:2: cannot find package "http://github.com/hyperledger/fabric/core/chaincode/shim" in any of: vp0_1 | /opt/go/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOROOT) vp0_1 | /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOPATH) [11:17] I am running outside vagrant... Any idea regarding the set up i'm missing... plz help me proceed.

pushpalatha
2016-10-14 07:31
Hi all, I have the latest gerrit code . Facing the following issue while make peer. Any idea? Please help. Pushpalathas-MacBook-Pro:fabric pushpa$ make peer build/bin/peer CGO_CFLAGS=" " CGO_LDFLAGS="-lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy" GOBIN=/Users/pushpa/gocode/src/github.com/hyperledger/fabric/build/bin go install -ldflags "-X http://github.com/hyperledger/fabric/metadata.Version=0.7.0-snapshot-551fa9b" http://github.com/hyperledger/fabric/peer # http://github.com/hyperledger/fabric/vendor/github.com/Sirupsen/logrus vendor/github.com/Sirupsen/logrus/terminal_darwin.go:10: ioctlReadTermios redeclared in this block previous declaration at vendor/github.com/Sirupsen/logrus/terminal_bsd.go:7 vendor/github.com/Sirupsen/logrus/terminal_darwin.go:12: Termios redeclared in this block previous declaration at vendor/github.com/Sirupsen/logrus/terminal_bsd.go:9 # http://github.com/hyperledger/fabric/vendor/github.com/tecbot/gorocksdb vendor/github.com/tecbot/gorocksdb/options.go:328: not enough arguments in call to _Cfunc_rocksdb_options_set_compression_options make: *** [build/bin/peer] Error 2

reube
2016-10-14 10:02
has joined #fabric

cbf
2016-10-14 11:26
@pushpalatha you are building outside vagrant using what set of instructions to set up your environment?

pushpalatha
2016-10-14 11:31
I was just booting single peer alone outside vagrant

garisingh
2016-10-14 12:13
you should really just use the Docker images with Docker for Mac.

garisingh
2016-10-14 12:15
the errors you are getting: ``` vendor/github.com/Sirupsen/logrus/terminal_darwin.go:10: ioctlReadTermios redeclared in this block previous declaration at vendor/github.com/Sirupsen/logrus/terminal_bsd.go:7 ``` ^^^ for this one the logrus package in vendor is broken for compiling on OSX. Basically you need to edit `vendor/github.com/Sirupsen/logrus/terminal_bsd.go` and delete `darwin` The second error means you have the wrong version of RocksDB. Needs to be RocksDB 4.1. If you used brew to install it, it will be the wrong version

n.ohagan
2016-10-14 13:52
has joined #fabric

donovanhide
2016-10-14 17:48
Is there a way to generate a random private key per node when testing PBFT consensus: https://github.com/hyperledger/fabric/blob/master/peer/core.yaml#L83 Or is that the default behaviour if a privateKey is not specified?

garisingh
2016-10-14 17:49
@donovanhide - not sure why that is still around. with security enabled, each peer gets it own enrollment key from membership services

donovanhide
2016-10-14 17:50
@garisingh Thanks, guess that means I need to sort out my membershipsvc kubernetes config out first :slightly_smiling_face:

donovanhide
2016-10-14 17:51

donovanhide
2016-10-14 17:51
Basically trying to work out what needs to be supplied by kubernetes config maps to each member of a petset.


garisingh
2016-10-14 17:53
peer.id needs to be unique and for PBFT you should use vp0,vp1,...,vpX

donovanhide
2016-10-14 17:55
Setting your own peer id seems a little odd to me, as there could be accidental or malicious collisions. Ripple identifies nodes by generating an id from a hash of the public key of the private key, bitcoin account style.

garisingh
2016-10-14 17:56
point in time

garisingh
2016-10-14 17:56
:wink:

garisingh
2016-10-14 17:57
it was due to time constraints when getting working on the PBFT stuff

donovanhide
2016-10-14 17:57
Ok, no worries, I’ll stop nit-picking :slightly_smiling_face:

garisingh
2016-10-14 18:22
good questions - someone's gotta keep people on their toes

garisingh
2016-10-14 18:22
and any suggestions on cryptographic / unique identities are most welcome

donovanhide
2016-10-14 19:10
Well here’s the ripple way: https://github.com/rubblelabs/ripple/blob/master/crypto/ed25519.go#L20-L23 https://github.com/rubblelabs/ripple/blob/master/crypto/util.go#L35-L41 In words, the id is the ripemd160 hash of a sha256 hash of the public key, which is of course generated from the private key. For fabric, I guess this means deferring the creation of a peer id until the peer has enrolled with the membership services.

yacovm
2016-10-14 19:11
It's not that simple, you also need to prevent replay attacks

yacovm
2016-10-14 19:11
In fabric, at least

donovanhide
2016-10-14 19:12
Replaying which message?

yacovm
2016-10-14 19:12
Otherwise a cert-based key isn't sufficient IMO

yacovm
2016-10-14 19:12
Authentication between peers

yacovm
2016-10-14 19:12
I've been working on such a thing and its in my pipeline

yacovm
2016-10-14 19:13
But no ETA yet

donovanhide
2016-10-14 19:15
Not sure I understand the replay attack. You mean intercepting the message where the membership services supplies the enrollment key? If that happens, it’s game over for everything?

yacovm
2016-10-14 19:15
I don'tknow how ripple works but obviously getting a message from a peer that proves that the messge originated from the real peer doesn't prove the peer that sent the message is the real peer

donovanhide
2016-10-14 19:16
I guess the requesting peer has to challenge the membership services to sign something it randomly generated.

yacovm
2016-10-14 19:17
Yep

yacovm
2016-10-14 19:17
Exactly

yacovm
2016-10-14 19:17
No, wait

yacovm
2016-10-14 19:17
Not the membership

yacovm
2016-10-14 19:18
The peer that is servicing the connection needs to challenge the peer connecting to it

donovanhide
2016-10-14 19:19
>>with security enabled, each peer gets it own enrollment key from membership services I’m talking about this step, are you as well?

yacovm
2016-10-14 19:20
"Setting your own peer id seems a little odd to me, as there could be accidental or malicious collisions. Ripple identifies nodes by generating an id from a hash of the public key of the private key, bitcoin account style."

yacovm
2016-10-14 19:20
I'm just saying that identifying nodes is also not trivial, because you need to corallate the connection with the peer

yacovm
2016-10-14 19:21
A node that says hey i'm totally the real node i swear here is my id isn't sufficient on a true byzantine environment

donovanhide
2016-10-14 19:22
Yep, if you used openssl you can use the PeerFinishedMessage as the challenge that both peers must sign.

donovanhide
2016-10-14 19:23

yacovm
2016-10-14 19:23
Hmmm

donovanhide
2016-10-14 19:23
Arguably that was susceptible to the Triple Handshake Attack though.

yacovm
2016-10-14 19:23
Wait

yacovm
2016-10-14 19:24
But we use gRPC

yacovm
2016-10-14 19:24
How can we use this?

donovanhide
2016-10-14 19:24
Is grpc not talking over tls?

yacovm
2016-10-14 19:24
We don't have access to these layers AFIK

yacovm
2016-10-14 19:25
At the connection servicing side, at least i never saw how from the API you can derive that

donovanhide
2016-10-14 19:25
The TLSUnique field might be of interest: https://golang.org/pkg/crypto/tls/#ConnectionState

donovanhide
2016-10-14 19:25
I’m no crypotgrapher though, you might want to consult an expert :slightly_smiling_face:

yacovm
2016-10-14 19:26
But we don't have a reference to these structs from the gRPC stream from what i know :disappointed:

donovanhide
2016-10-14 19:26
The theory is that you keep track of every message that went between the two TLS counterparties in the handshake and this is guaranteed to be the same on both ends.

donovanhide
2016-10-14 19:27
You can use that as the challenge that needs to be signed.


yacovm
2016-10-14 19:29
I don't see how this helps

donovanhide
2016-10-14 19:31
You need a challenge that both peers can sign. Both peers speak over GRPC. If this GRPC communication is over TLS, when the TLS connection is established, you have a hash of all the messages involved (tls-unique). The first GRPC message between peers is another handshake that contains a signature of that hash along with the peer’s public key.

yacovm
2016-10-14 19:31
I don't have access to that hash however

yacovm
2016-10-14 19:32
From the API in the server side

donovanhide
2016-10-14 19:32
Where’s the code that does the peer grpc.Dial?

yacovm
2016-10-14 19:33
I need access in the server side method of the gRPC call

yacovm
2016-10-14 19:34
The dial is in the client side, i need the server to know the client is who it claims it is

donovanhide
2016-10-14 19:35
https://golang.org/pkg/crypto/tls/#Conn.ConnectionState ConnectionState hangs off a net.Conn, which you’ll have access to on both sides.

donovanhide
2016-10-14 19:36
Where’s the code you are referring to?


yacovm
2016-10-14 19:37
The Chat method

yacovm
2016-10-14 19:38
Sorry i'm typing in the phone app :expressionless: , no way to reference the line exactly

donovanhide
2016-10-14 19:38
Basically, this is what ripple does: every peer has a self-signed certificate, they establish TLS connections with each other, and then sign the peer finished message (openssl equivalent of tls-unique) using their application level private key.

yacovm
2016-10-14 19:39
Go to "// Chat implementation of the the Chat bidi "

yacovm
2016-10-14 19:40
Frm that object in the arguments i don't see a way of extracting the ssl information


donovanhide
2016-10-14 19:41
I’m sure you get access to the tls.Conn around here.

yacovm
2016-10-14 19:41
That's the client side though

yacovm
2016-10-14 19:41
I need to access that on the server side

donovanhide
2016-10-14 19:42
Where’s the listen code?

yacovm
2016-10-14 19:43
Not easy to find with a phone...


yacovm
2016-10-14 19:43
Yep

yacovm
2016-10-14 19:44
A bit above that though

yacovm
2016-10-14 19:45
In the serve method

donovanhide
2016-10-14 19:46
Guess, you’d have to look at: https://godoc.org/google.golang.org/grpc/credentials#TransportCredentials Or maybe: https://godoc.org/google.golang.org/grpc/credentials#TLSInfo Don’t know for certain, but it will be in there somewhere :slightly_smiling_face:

yacovm
2016-10-14 19:46
Ok

donovanhide
2016-10-14 19:47
Hope that helps with some ideas :slightly_smiling_face:

yacovm
2016-10-14 19:49
It might, i dunno. I hope i can find the time to play with it a little. I was thinking of simply employing a standard handshake protocol with the gRPC messages and that's it but if we can extract the pub key from the ssl session underneath that's better

donovanhide
2016-10-14 19:50
It’s not the public key, but a hash of all the messages sent and received during the TLS handshake.

yacovm
2016-10-14 19:50
Knowing the session symmetric key doesnt help

yacovm
2016-10-14 19:50
Because we need to know who the peer that connected to us is

donovanhide
2016-10-14 19:51
>>Basically, this is what ripple does: every peer has a self-signed certificate, they establish TLS connections with each other, and then sign the peer finished message (openssl equivalent of tls-unique) using their application level private key.

yacovm
2016-10-14 19:51
How does the signing of the peer finishes message help us?

donovanhide
2016-10-14 19:52
It’s a unique value to that particular network connection. If a peer signs it with its private key. You know who the peer is and that it told you that over a secure connection.

donovanhide
2016-10-14 19:53

yacovm
2016-10-14 19:53
How can you know who the peer is?

yacovm
2016-10-14 19:54
It tells the TLS layer that, not to the gRPC layer

donovanhide
2016-10-14 19:54
Because it sent you a signature of the hash of the TLS stage and it’s public key via GRPC.

donovanhide
2016-10-14 19:55
This is how ripple works, I’m not making it up :slightly_smiling_face:

donovanhide
2016-10-14 19:55
Except they are still using old protobuf :slightly_smiling_face:

yacovm
2016-10-14 19:57
That's what i'm missing here- who gets the public key via gRPC? surely not the application above the gRPC, right?



donovanhide
2016-10-14 19:58
It’s now done via HTTP headers, but it did used to be over protobuf.

yacovm
2016-10-14 19:59
But protobuf is above the gRPC isn't it?

donovanhide
2016-10-14 19:59
GRPC is pretty much protobuf v3

yacovm
2016-10-14 20:00
Ok so you're saying the authentication logic is in the *application layer* and involves sending the pub key

donovanhide
2016-10-14 20:01
Yes! And a signature of the hash of the TLS stage.

donovanhide
2016-10-14 20:01
See `Session-Signature` in the last link.

yacovm
2016-10-14 20:02
Oh so you can verify that sig with the pub key sent via the grpc

donovanhide
2016-10-14 20:02
Yes.

yacovm
2016-10-14 20:02
Got it

donovanhide
2016-10-14 20:02
Great :slightly_smiling_face:

yacovm
2016-10-14 20:03
Still i don't think this exists in go grpc, i'd like to know i'm wrong, but thanks for the tips

yacovm
2016-10-14 20:03
I'll try to find the time to play with it

donovanhide
2016-10-14 20:06
Worth tracing the code back from here to see what is actually does: https://github.com/golang/go/blob/f28cf8346c4ce7cb74bf97c7c69da21c43a78034/src/crypto/tls/conn.go#L1302-L1308 https://github.com/golang/go/blob/f28cf8346c4ce7cb74bf97c7c69da21c43a78034/src/crypto/tls/conn.go#L67-L72 Anyway, I’ll leave you to it. Thanks for the crypto chat :slightly_smiling_face:

xianjun
2016-10-14 20:47
has joined #fabric

udon
2016-10-15 06:27
has joined #fabric

yukikaze
2016-10-15 08:42
has joined #fabric

mcampora
2016-10-16 06:32
has joined #fabric

reachk.raj
2016-10-16 15:25
has joined #fabric

donovanhide
2016-10-16 15:41
Just want to clear up my understanding of chaincode. If I’m running Docker (in my case Docker In Docker on Kubernetes…) and I want to register a chaincode to run on it, I need to `go build` that chaincode on the same architecture that the Docker image will be running, which I’m assuming is linux-amd64. Will I be able to cross compile from an OS X machine using `GOOS` and `GOARCH` and then register that chaincode? Seems you have to run the built chaincode to do the actual registration, so I’d still need a linux box or vm to register?

donovanhide
2016-10-16 15:41
I realise this isn’t a problem if I’m using vagrant :slightly_smiling_face:

muralisr
2016-10-16 15:46
@donovanhide the peer will do the `go build` and package for docker. Everthing else you say above would appear the follow from that

muralisr
2016-10-16 15:46
`—peer-chaincodedev` is the only mode wher the user would have to do `go build` of the chaincode

muralisr
2016-10-16 15:48
With all the SDK work, the ground might shift but the above is w.r.t to current release

donovanhide
2016-10-16 15:53
@muralisr Thanks for the reply :slightly_smiling_face: Still a bit confused though.. Say I’ve got 5 peers running using PBFT on kubernetes, each in a linux based docker image. I have docker in docker running on that same kubernetes rig. I have some local chaincode on my OS X box and a `peer` built locally. How do I get that source code to run on the docker in docker container? Do I have to transfer the source code to one of the remote peers? Sorry, just a bit confused by the docs: http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Chaincode-setup/#running-the-chaincode

muralisr
2016-10-16 15:54
no worries! I understand its not as clear as it could/should be… let me look up the link to get the context first

muralisr
2016-10-16 15:56
right . if you check `--peer-chaincodedev` is used in all the examples there

muralisr
2016-10-16 15:56
that’s the dev mode where the responsible for building and starting the chaincode

muralisr
2016-10-16 15:59
when that flag is not used, the deploy transaction would be used by the peer to build and constructe chaincode docker image and run it in a docker container. And as any normal transaction process, the deploy transaction is distributed from the peer to which it was sent to to all others in the chain who will do the the identical processing

muralisr
2016-10-16 16:00
as an example, you should see no mention of `—peer-chaincodedev` in this http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Network-setup

donovanhide
2016-10-16 16:03
So my local OSX peer must be running and have awareness of at least one peer node in the remote kubernetes rig? What’s the actual sequence of commands to get my local chaincode running locally, and then deployed to all other peers? Feels like that bit is missing from the page you linked.

muralisr
2016-10-16 16:05
right. let me take chaincode stored remotely as a simpler starting point (the problem is with the “local” chaincode on filesystem which we can take as next step)

muralisr
2016-10-16 16:06
if you use `CORE_PEER_ADDRESS=myknownpeer:7051 peer chaincode deploy -p https://github.com/me/mychaincode`

muralisr
2016-10-16 16:06
you point myknowpeer to code on a remote github which it pulls on the fly and builds

muralisr
2016-10-16 16:07
and that transaction is sent to all peers

donovanhide
2016-10-16 16:07
Ahh, remote github links for code deployment to docker. I think my brain had skipped that part...

muralisr
2016-10-16 16:07
not at all

muralisr
2016-10-16 16:07
you are absolultely on the right track..bear with me for a bit

muralisr
2016-10-16 16:08
I introduced the https://github just to clear the way

muralisr
2016-10-16 16:08
the problem is if its on your “local” system (as opposed to remote github for CORE_PEER_ADDRESSed peer to pull the chaincode from)

muralisr
2016-10-16 16:10
then the obvious approach is to treat your local box as a a “non-validating peer” (which will go away - at least as of now - in v1.0) and use it just to construct the transaction with the chaincode to be distributed to the actual “validating” peers

muralisr
2016-10-16 16:10
Or

muralisr
2016-10-16 16:12
you could package that common code into each of the peer’s filesystem and use the “deploy” to access it directly on the filesystem (as opposed to pulling it from https://github.com) and then proceed to package for docker as usual

donovanhide
2016-10-16 16:13
Ok, thank you very much! That clears up my understanding a lot! I prefer the first of the two options for now.

muralisr
2016-10-16 16:13
btw the last is precisely what happens with all the canned examples shipped with the fabric

muralisr
2016-10-16 16:13
sure thing. thanks for hanging in there :slightly_smiling_face:

muralisr
2016-10-16 16:13
the https://github.com has to be public (no creds) for now

muralisr
2016-10-16 16:14
but much of this would be streamlined by SDK in the 1.0 work

donovanhide
2016-10-16 16:14
Will there be a Go SDK as well, or is a node.js install going to be mandatory?

muralisr
2016-10-16 16:15
there was talk of that … let me refer you to @garisingh @ghaskins @cbf @jzhang

donovanhide
2016-10-16 16:15
Ok, many thanks for the answers :slightly_smiling_face: Much appreciated!

troyronda
2016-10-16 16:15
+1 on Go SDK

muralisr
2016-10-16 16:15
and if you like that’s a great area for contribution too

donovanhide
2016-10-16 16:16
Will have a look at the node.js code and see if it is a big job :slightly_smiling_face:

muralisr
2016-10-16 16:16
understand :slightly_smiling_face:

troyronda
2016-10-16 16:17
:)

cbf
2016-10-16 16:20
Yeah, I have a go sdk in the works

cbf
2016-10-16 16:20
too many other things atm

rickr
2016-10-16 17:50
has joined #fabric

garisingh
2016-10-16 18:24
well given that we are supposed to be writing comprehensive Go tests for all components we should be able to actually end with most of the functions required for Go SDK for v1

jzhang
2016-10-16 19:13
@donovanhide @troyronda head over to the channel #fabric-sdk-dev, a number of contributors are collaborating on java sdk and a python sdk. GO has been brought up but so far no code has been written. @cbf I didn’t know you were looking, has this (GO SDK) been brought up to TSC yet?

cbf
2016-10-16 22:05
Not yet... have code separated but still working through some initial testing

david.acton
2016-10-16 22:58
Hey Gang.. In the membersrvc.yaml file, how are the Certs for *server.tls.cert.file* and *server.tls.key.file* generated. I’m new to this crypto stuff.

conghonglei
2016-10-17 01:17
has joined #fabric

ccooper21
2016-10-17 05:20
@david.acton I'm not sure if there are any special considerations for Fabric, but I suspect you want to create a self-signed TLS certificate. You can Google on how to do this. Here is an article explaining the process that was near the top of my search results:


kite
2016-10-17 05:34
has joined #fabric

kite
2016-10-17 05:38
How to link peer service and member service? (Peer service deploy on machine 1, member service deploy on machine 2).

kite
2016-10-17 05:41
Peer service and member service are start up by pull image.

matanyahu
2016-10-17 06:57
I am currently trying to document crypto mechanisms involved in Fabric in different areas and processes of the ledger activity. I was sweeping through the source code in /master/core/crypto and I found references to : (1) client_confidentiality.go (2) node_tca.go (3) hash.go (4) ecdsa.go (5) x509.go. There's more references to cryptographic mechanisms in /fabric/core/crypto. Unfortunately, none of these pieces of code are documented or commented and therefore, I do not know what they serve for and in what order should I analyze them. Can anyone help me understanding what is used and when?

cca
2016-10-17 08:22
@matanyahu: There is some documentation in protocol-spec. Please go to #fabric-crypto and ask there.

david.acton
2016-10-17 09:09
@ccooper21 Thanks for the response :slightly_smiling_face:

ahannigan
2016-10-17 09:12
has joined #fabric

donovanhide
2016-10-17 10:05
I’m getting this error when trying to test out chaincode deployment: ```root@peer-1:/opt/gopath/src/github.com/hyperledger/fabric# CORE_CHAINCODE_DEPLOYTIMEOUT=2000000 peer chaincode deploy -p https://github.com/donovanhide/chaincode -c '{"Function":"init", "Args": []}' 09:58:30.350 [logging] LoggingInit -> DEBU 001 Setting default logging level to DEBUG for command 'chaincode' Error: Error building chaincode: rpc error: code = 2 desc = Error getting chaincode package bytes: Error getting code Getting chaincode took too long ``` Trying to debug, but shouldn’t this logger be `chaincode` rather than `golang/hash`: https://github.com/hyperledger/fabric/blob/master/core/chaincode/platforms/golang/hash.go#L41 Means you don’t get this line in the log: https://github.com/hyperledger/fabric/blob/master/core/chaincode/platforms/golang/hash.go#L167

muralisr
2016-10-17 11:50
```vagrant@hyperledger-devenv:v0.0.11-7123f77:/opt/gopath/src/github.com/hyperledger/fabric/peer$ ./peer chaincode deploy -p https://github.com/donovanhide/chaincode -c '{"Function":"init", "Args": []}' Deploy chaincode: 3be00d13650d46b1caf84289bd8bb762b27227c01f70a3357b2144d267d426f40259179790b9dd9e074a8956598c2eb48aa2b397b68fcffde85f654a0cd5966b```

muralisr
2016-10-17 11:51
@donovanhide your command worked for me against 0.6 release (I just had that handy but should work on master also) and I see the container started and running

muralisr
2016-10-17 11:51
```vagrant@hyperledger-devenv:v0.0.11-7123f77:/opt/gopath/src/github.com/hyperledger/fabric/peer$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c1d9f97baede 9d8fb89e5f84 "/bin/sh -c 'go insta" 9 seconds ago Up 8 seconds ecstatic_saha vagrant@hyperledger-devenv:v0.0.11-7123f77:/opt/gopath/src/github.com/hyperledger/fabric/peer$ ```

stchrysa
2016-10-17 11:52
has joined #fabric

donovanhide
2016-10-17 11:59
@muralisr Thanks, I got it working by doing a manual `go get` and then omitting the `https://` from the path. I’m running 5 peers on single machine until I get a corporate credit card on that Kubernetes account :slightly_smiling_face: It looks like the `deploytimeout` env variable might not be being picked up.

muralisr
2016-10-17 11:59
@donovanhide more to your point though, not sure about the logging component… the package being completely outside of chaincode. But I can see why we’d want that

kletkeman
2016-10-17 19:55
The developer preview on Bluemix has had some issues (I think new fabrics have patches for these as of this week) and we got a number of divergent block chains. I have been obsessed with the need for a quick way to find the divergent block and decode the transactions, gathering all data from all peers into one message. I really got into in on the weekend and finished it up today. Here is the node-red flow (with 3 sub flows) for that: https://github.com/ibm-watson-iot/blockchain-samples/tree/master/testing/node-red/fabricDivergentBlockFinder ... use this to quickly diagnose your divergence issues. If there are errors on one or more peers, you may be experiencing the issues we've been seeing. But if there are no transaction errors and your hash diverges anyway, then look to your chaincode as a possible (more likely probable) source for the divergence (as in non-deterministic behavior.)

muralisr
2016-10-17 20:52
@kletkeman so a tool that’ll walk through the blockchain on different peers and point to points of divergence (and follow them recursively) ?

kletkeman
2016-10-17 20:54
@muralisr Not sure what you mean by recursively. It polls all configured peer urls for the /chain and verifies first that the height is the same (might be in between catch ups) ... then is so, it proceeds to verify the hashes. If they are the same, then it does nothing else. If they differ, then it performs a binary search to find the first block with hash divergence. I would call it iterative rather than recursive.

kletkeman
2016-10-17 20:55
@muralisr And it does not work on today's Bluemix fabrics because the urls shown in the dashboard send it to the web page, and that's what the tool gets back.

kletkeman
2016-10-17 20:57
@muralisr The response message sorts all output to be the same order as the config URLs ... so vp0 to vp3 for example ... it shows hash and prevhash separately for convenience (to prove that it is the dirvergent block) and then summarizes and decodes the chaincode ID and transactions to speed up diagnosis.

muralisr
2016-10-17 20:59
thanks for sharing @kletkeman … this needs to be checked out for sure!

kletkeman
2016-10-17 21:00
@muralisr Glad you like it ... I enjoyed the node-red education and have been pining for such a tool. I want to run in parallel with our IoT contract long term tests so that we can prove deterministic behavior etc ...

muralisr
2016-10-17 21:02
just curious…do you have a feel for for how fast/slow it is ?

muralisr
2016-10-17 21:02
to run thru the blocks I mean

garisingh
2016-10-18 07:57
@kletkeman - not sure what you mean about BMX? I have not looked at the tool but something like this is certainly doable against BMX. I have actually been working on a Spark job which does something similar

henriquecd
2016-10-18 11:40
has joined #fabric

zemtsov
2016-10-18 12:28
has joined #fabric

kletkeman
2016-10-18 13:11
@muralisr I've been reducing the timeouts by looping in node-red at 2s intervals. I find that the tool can get the headings and read 8 blocks (the maximum it takes to find the culprit block with 118 chain height) in something like 20s. Basically, I launch the 4 GETs in parallel, and each of those is funneled to a node that stores the result at flow level. A second path loops through a delay 2s node and checks the result until it sees the correct array length. I'm having a bit of trouble with the terminating condition when you never receive the last result, but I will work on that. For now, that is a pretty rare event.

kletkeman
2016-10-18 13:18
@garisingh If you are referring to my comment on Mluemix 0.5 having issues, we have been unable to use Bluemix for weeks because of instability and chain corruption. We determined that the corruption was coming from timeouts in the network and early attempts to use the chaincode that was taking between 10m and 20m to deploy successfully. I've forwarded that evidence to Mihir weeks ago. I'll paste an example of the output of this tool (just logs for now), which shows a perfect example of the corruption that starts at the 28th block ...

garisingh
2016-10-18 13:24
oh - I thought you were saying that the tool would not work on BMX

garisingh
2016-10-18 13:25
due to lack of function in BMX as opposed to stability

kletkeman
2016-10-18 13:25

kletkeman
2016-10-18 13:27
@garisingh Ah ... sorry, I was probably not quite clear. BMX works great normally, but there have been stability issues for a while now, which of course might be solved with the new fabrics that get created as of Monday. I have one of those now and will be working with it for the next several weeks.

humblealex
2016-10-19 01:35
Hi, everyone. I just found out that after every invokation, there is a relatively large disk-volume being taken up (about 32M every 10,000 invokes) . Mostly log files. I was wondering are there some ways of reducing the log volume after every invoke? Thanks in advance!

brunops
2016-10-19 02:24
has joined #fabric

ys3
2016-10-19 08:36
has joined #fabric

gl
2016-10-19 10:10
has joined #fabric

ghaskins
2016-10-19 15:49
if theres anyone out there with expertise in core/crypto, we could use your help on this one: https://jira.hyperledger.org/browse/FAB-751 as it relates to CR 1839

ghaskins
2016-10-19 15:49
its blocking the merge of master->convergence

yacovm
2016-10-19 16:02
the console output looks like an env thing, doesn't it? lots of "no such file or directory" around time `15:15:16` and "no rows in RS" sounds like a DB thing

yacovm
2016-10-19 16:03
maybe there is something wrong with the CI like it was today? @ghaskins


ghaskins
2016-10-19 22:34
See CR 1877/1875

c0rwin
2016-10-19 22:40
Any estimates when it will be merged?

ghaskins
2016-10-19 22:45
Id say in the next 18h

ghaskins
2016-10-19 22:45
Note that these were applied to convergence (I think)

ghaskins
2016-10-19 22:45
Your patch is in master, right?

c0rwin
2016-10-19 22:47
nope, `convergence`

ghaskins
2016-10-19 22:47
Ok perfect

c0rwin
2016-10-19 22:47
yeah, going to rebase

ghaskins
2016-10-19 22:47
If they can gather 2+2 I'll merge tonight

ghaskins
2016-10-19 22:47
I'm mobile at the moment

ghaskins
2016-10-19 22:49
I'll check status when back home later tonight

c0rwin
2016-10-19 22:50
@ghaskins great, thanks

t-watana
2016-10-20 00:01
has joined #fabric

daisaku
2016-10-20 01:41
has joined #fabric

chatsap
2016-10-20 06:04
has joined #fabric

stevenroose
2016-10-20 10:35
Where does the vagrant setup of the dev environment save the virtualbox image?

stevenroose
2016-10-20 10:36
I'm on a Btrfs filesystem and I want to turn off copy-on-write before I create the image

zemtsov
2016-10-20 10:38
check “~/VirtualBox VMs"

stevenroose
2016-10-20 10:40
it's in the default VirtualBox folder?

stevenroose
2016-10-20 10:40
@zemtsov not in a Vagrant folder?

zemtsov
2016-10-20 10:41
yes, the image is created by VirtualBox and saved in its folder, I believe

zemtsov
2016-10-20 10:41
you can start VirtualBox and see the list of your virtual machines

bari
2016-10-20 11:25
has joined #fabric

ghaskins
2016-10-20 12:55
theres also a .vagrant folder, IIRC

ghaskins
2016-10-20 12:55
from where you run the vagrant-up

ghaskins
2016-10-20 12:55
@c0rwin 1875/1877 merged

c0rwin
2016-10-20 13:58
@ghaskins thanks

msoumeit
2016-10-20 15:11
has joined #fabric

jackkleeman
2016-10-20 15:14

jackkleeman
2016-10-20 15:14
There is plenty of space on my server

jackkleeman
2016-10-20 15:14
what could be causing this error?

jackkleeman
2016-10-20 15:14
I have been redeploying a lot today - is there some kind of cleanup that I should be doing in my redploy script?

jackkleeman
2016-10-20 15:15
I have probably deployed about 30 times in the last few hours

jackkleeman
2016-10-20 15:15
so I presume that is the issue

sukrith
2016-10-20 20:29
can I deploy 2 seperate chaincode on my fabric network, to access the same world state data?

ghaskins
2016-10-21 01:22
@sukrith: no, each sees its own key space

zanejia
2016-10-21 02:03
Is table a special kind of state key-value, and the chaincode can only access its own table like state data?

ghaskins
2016-10-21 02:16
a chaincode can only access its own kv-store, and the table abstraction is built on top of that

ghaskins
2016-10-21 02:16
chaincode instance, I should say

ghaskins
2016-10-21 02:17
(since you could run more than one instance of the same code)

zanejia
2016-10-21 02:47
Got it. Thank you @ghaskins

kyrieleison
2016-10-21 03:35
has joined #fabric

garisingh
2016-10-21 09:25
@sukrith - not directly. state data is coped to chaincode. you COULD query one chaincode from another, but you don't have direct access to the state data of another chaincode from within chaincode

hellospencer
2016-10-21 13:28
has joined #fabric

kh2se2013
2016-10-21 13:47
has joined #fabric

mloepfe
2016-10-21 13:56
has joined #fabric

tuand
2016-10-21 17:34
v1.0 architecture proposals on the wiki https://wiki.hyperledger.org/community/fabric-design-docs

mart0nix
2016-10-21 17:48
@tuand that’s a great resource. Thanks!

mart0nix
2016-10-21 17:49
@mart0nix pinned a message to this channel.

dongmingh
2016-10-21 17:57
has joined #fabric

ghaskins
2016-10-21 19:53
seeing a problem that I am currently interpreting as an external dep problem

ghaskins
2016-10-21 19:53

ghaskins
2016-10-21 19:54
this happens in master, minimally, but given what I am seeing I am guessing there is some kind of problem with the yaml package, or the http://gopkg.in reference to it

ghaskins
2016-10-21 19:54
anyone else seeing this?

ghaskins
2016-10-21 20:01
ah, its probably the github/ddos stuff

ghaskins
2016-10-21 20:02
ill try again later

arnaud
2016-10-21 20:02
hi, yes, that's what I was going to tell you: http://github.com isn't accessible for some of us

arnaud
2016-10-21 20:03
so, any external dependency may be failing right now

jackkleeman
2016-10-22 15:08
what can I do about my deploy transactions taking a very long time? like minutes. this seems to be increasing over time as i deploy over and over - Is there something I should be resetting every few times I redeploy, like a cache? should I be deleting old docker images regularly?

garisingh
2016-10-22 15:52
@jackkleeman - what's your peer setup?

jackkleeman
2016-10-22 16:42
just one, security not enabled

garisingh
2016-10-22 16:45
hmm - well deleting container instances and images would probably help somewhat

yacovm
2016-10-22 18:42
where are you deploying to? maybe its a far away server? is the docker endpoint running locally or in a different host?

mikedeshazer
2016-10-23 03:47
My buddy @kerstentw wrote this awesome post on how to deploy a Fabric Blockchain with brooklyn! https://medium.com/think-consortium-on-blockchain/building-a-permissioned-blockchain-pt-1-8ebab9e68582#.n7uf4hg92

kerstentw
2016-10-23 03:47
has joined #fabric

jackkleeman
2016-10-23 09:51
it is not local, its a server that we are using for dev

yacovm
2016-10-23 09:53
so maybe the communication to it is slow or something?

leon.chu
2016-10-23 16:41
has joined #fabric

shireesh18
2016-10-24 04:39
hi, am setting up the dev environment on my windows 7 machine. am getting the below error while cloning the hyperledger fabric code. I did create the key gen pair using puttygen and placed it in my local .ssh folder. Plz let me know if you have experienced this issue . Permission denied (publickey). fatal: Could not read from remote repository.

ry
2016-10-24 05:10
Did you add your public key to Gerrit?

shireesh18
2016-10-24 05:26
@ry , yes I did add public key to gerrit

shireesh18
2016-10-24 07:07
finally it started working . I have used gitbash to create key pair and also ensure that i created id_rsa folder. Am not sure why this is needed !!

jackkleeman
2016-10-24 10:48
but I am deploying from local files, on ssh within the server

donovanhide
2016-10-24 12:07
When using PBFT, would there be any issues with setting `CORE_PEER_DISCOVERY_ROOTNODE` for all peers to point to a peer with id `peer-0`? In other words `peer-0` also points to `peer-0`. I ask because all nodes seem to have error-free logs, except `peer-0`, which has: ```12:05:11.193 [peer] HandleMessage -> DEBU 1f3583 Handling Message of type: DISC_PEERS 12:05:11.193 [peer] beforePeers -> DEBU 1f3584 Received DISC_PEERS, grabbing peers message 12:05:11.193 [peer] beforePeers -> DEBU 1f3585 Received PeersMessage with Peers: peers:<ID:<name:"peer-1" > address:"10.0.0.23:7051" type:VALIDATOR > peers:<ID:<name:"peer-3" > address:"10.0.1.47:7051" type:VALIDATOR > peers:<ID:<name:"peer-4" > address:"10.0.0.24:7051" type:VALIDATOR > peers:<ID:<name:"peer-0" > address:"10.0.1.45:7051" type:VALIDATOR > 12:05:11.194 [consensus/handler] HandleMessage -> DEBU 1f3586 Did not handle message of type DISC_GET_PEERS, passing on to next MessageHandler 12:05:11.194 [peer] HandleMessage -> DEBU 1f3587 Handling Message of type: DISC_GET_PEERS 12:05:11.194 [peer] beforeGetPeers -> DEBU 1f3588 Sending back DISC_PEERS 12:05:11.195 [peer] SendMessage -> DEBU 1f3589 Sending message to stream of type: DISC_PEERS 12:05:11.584 [peer] SendMessage -> DEBU 1f358a Sending message to stream of type: DISC_GET_PEERS 12:05:11.585 [consensus/handler] HandleMessage -> DEBU 1f358b Did not handle message of type DISC_GET_PEERS, passing on to next MessageHandler 12:05:11.585 [peer] HandleMessage -> DEBU 1f358c Handling Message of type: DISC_GET_PEERS 12:05:11.585 [peer] handleChat -> ERRO 1f358d Error handling message: Peer FSM cannot handle message (DISC_GET_PEERS) with payload size (0) while in state: created```

yacovm
2016-10-24 12:19
Can you get to beforeGetPeers in core/peer/peer.go?

donovanhide
2016-10-24 12:23
@yacovm Is that a question for me? Not sure how I’d check that… Basic question is can a peer handle `CORE_PEER_DISCOVERY_ROOTNODE` being set to its own id?

yacovm
2016-10-24 12:23
Oh wait thats in handler

yacovm
2016-10-24 12:24
I'll check when i get home if someone else won't

yacovm
2016-10-24 12:24
But basically that error isn't fatal

donovanhide
2016-10-24 12:42
Well, I’m also getting these from the other peers after I’ve tried to deploy some chaincode: ```12:39:36.101 [consensus/pbft] sendViewChange -> INFO 1cc729 Replica 0 sending view-change, v:1, h:0, |C|:1, |P|:0, |Q|:1 12:39:36.102 [consensus/util/events] loop -> DEBU 1cc72a Attempting to stop an unfired idle timer 12:39:36.102 [consensus/util/events] loop -> DEBU 1cc72b Stopping timer 12:39:36.102 [consensus/pbft] recvViewChange -> INFO 1cc72c Replica 0 received view-change from replica 0, v:1, h:0, |C|:1, |P|:0, |Q|:1 12:39:36.102 [consensus/handler] Verify -> DEBU 1cc72d Security is disabled 12:39:36.103 [consensus/pbft] recvViewChange -> WARN 1cc72e Replica 0 already has a view change message for view 1 from replica 0```

donovanhide
2016-10-24 12:42
And no docker images have been fired up anywhere…

muralisr
2016-10-24 15:49
@muralisr uploaded a file: https://hyperledgerproject.slack.com/files/muralisr/F2TCND1FY/move_convergence_changeset_to_master.txt and commented: cheat sheet for bringing changesets from convergence to master @ghaskins @ry

taylant
2016-10-24 16:08
has joined #fabric

sanchezl
2016-10-24 17:09
has joined #fabric

jappwilson
2016-10-24 18:15
has joined #fabric

balakrishna
2016-10-24 18:43
Hi all, I am having a problem while returning the errors from chiancode invoke methods to CLI or NodeSDK. Can anyone help out with this ?

balakrishna
2016-10-24 18:44
Is there anyway i can return errors from invoke function to NodeSDK in case of any errors

bfuentes
2016-10-25 14:28
Does anyone know why my peer cannot connect to the CA on V0.5?

bfuentes
2016-10-25 14:28
2016/10/25 14:20:33 grpc: ClientConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 172.17.0.1:50051: getsockopt: connection refused"; Reconnecting to "172.17.0.1:50051"

bfuentes
2016-10-25 14:29
i started first the CA, then the first peer vp0

garisingh
2016-10-25 14:36
@bfuentes - likely 172.17.0.1 is not the address of the CA. That's usually the bridge address

bfuentes
2016-10-25 14:40
@garisingh It is what I found on the docs of the V0.5

bfuentes
2016-10-25 14:40
CORE_PEER_PKI_ECA_PADDR=172.17.0.1:50051 -e CORE_PEER_PKI_TCA_PADDR=172.17.0.1:50051 -e CORE_PEER_PKI_TLSCA_PADDR=172.17.0.1:50051

bfuentes
2016-10-25 14:41
How can I know on which IP is running my CA ?

bfuentes
2016-10-25 14:41
i see only this :

bfuentes
2016-10-25 14:41
2016/10/25 14:06:21 Log level not recognized '', defaulting to DEBUG: logger: invalid log level 2016/10/25 14:06:21 Working at security level [256] INFO: 2016/10/25 14:06:21 CA Server (0.1) INFO: 2016/10/25 14:06:21 Fresh start; creating databases, key pairs, and certificates. INFO: 2016/10/25 14:06:23 ACA started. INFO: 2016/10/25 14:06:23 ECA started. INFO: 2016/10/25 14:06:23 TCA started. INFO: 2016/10/25 14:06:23 TLSCA started.

garisingh
2016-10-25 14:41
how are you running the CA? Docker or native?

garisingh
2016-10-25 14:42
looks like Docker from the `-e` ?

bfuentes
2016-10-25 14:42
is your Docker image i guess mastersingh24/fabric05-ca

garisingh
2016-10-25 14:43
try `docker network inspect bridge`

bfuentes
2016-10-25 14:43
running on a Docker engine on SL

garisingh
2016-10-25 14:43
it should show you the IPs of your containers

bfuentes
2016-10-25 14:43
"Containers": { "25f5e98f7a31923b7fa54884c3d87f376ed1e48ab41df46b1ac2fb496c084d12": { "Name": "ca", "EndpointID": "1eff96b52192dbd423caafdc2543dc8ac0920a4b93677f024b36696191d26f09", "MacAddress": "02:42:ac:11:00:03", "IPv4Address": "172.17.0.3/16", "IPv6Address": "" } },

bfuentes
2016-10-25 14:43
nice !

bfuentes
2016-10-25 14:43
thank you :smile:

garisingh
2016-10-25 14:43
np

bfuentes
2016-10-25 14:44
I feel padawan on Docker

garisingh
2016-10-25 14:52
unfortunately I know way too much about Docker via experience

bfuentes
2016-10-25 14:56
is a way to learn :slightly_smiling_face:

bfuentes
2016-10-25 14:58
hum

bfuentes
2016-10-25 14:58
i thought i had to take this :

bfuentes
2016-10-25 14:58
admin: 1 Xurw3yU9zI0l institution_a 00001 '{"registrar":{"roles":["client","peer","validator","auditor"],"delegateRoles":["client"]}}'

bfuentes
2016-10-25 14:59
from the member.yaml

bfuentes
2016-10-25 14:59
for my peers start options CORE_SECURITY_ENROLLID=admin -e CORE_SECURITY_ENROLLSECRET=Xurw3yU9zI0l

bfuentes
2016-10-25 15:00
but it says :

bfuentes
2016-10-25 15:00
14:59:55.925 [crypto] getEnrollmentCertificateFromECA -> ERRO 009 [validator.admin] Failed invoking CreateCertficatePair [rpc error: code = 2 desc = "Identity or token does not match."].

bfuentes
2016-10-25 15:00
:disappointed:

bfuentes
2016-10-25 15:03
is the name of the peer to appear the same in .yaml ? I mean if my peer is vp0, then i need a user vp0 too on the CA .yaml ? I cannot use another user like admin while starting my peer ?

anrodon
2016-10-25 17:24
has joined #fabric

diferal
2016-10-25 22:05
has joined #fabric

david.acton
2016-10-25 23:24
Hey gang. I want to get TLS working in both my Dev and eventually Prod envs. For DEV membersrvc, I assume I generate self signed TLS certs. Does this cert have to be in a particular format? e.g. ECDSA, RSA etc…? Would anyone happen to know the correct openssl command to run to get the right format?

spipes
2016-10-26 09:00
has joined #fabric

muralisr
2016-10-26 12:30
@damiang

damiang
2016-10-26 12:30
has joined #fabric

muralisr
2016-10-26 12:31
so to continue the discussion @damiang … orderer in v1.0 is the consentor in 0.6

muralisr
2016-10-26 12:31
it is separated out

muralisr
2016-10-26 12:32

damiang
2016-10-26 12:32
yes :slightly_smiling_face:

damiang
2016-10-26 15:10
@muralisr it works with 0.6. Thank you very much for your help!

muralisr
2016-10-26 15:10
@damiang thank you for checking it out… I still need to look at the peerchaincodedev mode in master… will do that later and update

damiang
2016-10-26 15:11
great

damiang
2016-10-26 15:11
btw, how did you know that I was using the main branch?

kletkeman
2016-10-26 15:51
@kletkeman uploaded a file: https://hyperledgerproject.slack.com/files/kletkeman/F2UEV1SKV/pasted_image_at_2016_10_26_11_51_am.png and commented: We are running long term load tests on a Bluemix peer and have found that, on a busy chain, it is essentially impossible to get the same chain height on all four peers at the same time. I have tried dozens of times and the closest I have come is to see the application contact point (vp0) be only 1 block behind ... but that never lasts ... the furthest I've seen is around 20 blocks behind ... there is a lot of hysteresis in that so it acts like a bungee cord. What this meant for my Hyperledger Divergence Monitor was that it could never rely on the chain heights in order to determine divergence. I updated the latest to handle this by calculating the min height and using that for convergence. That way, it will lag a few minutes behind the maximum chain height, but will give the best guess possible at the time as to whether the chain has diverged. See the screen shot for how this actually looks, and try it out here: https://github.com/ibm-watson-iot/blockchain-samples/tree/master/testing/node-red/Hyperledger%20Hash%20Divergence%20Monitor

kletkeman
2016-10-26 15:52
Oops ... just noticed that there is a minor display error on the header ... but you get the idea

muralisr
2016-10-26 15:59
@damiang recommend you continue using 0.6 …but for completeness with the original issue on master - you’d need to add `CORE_CHAINCODE_MODE=dev` to the deploy command to run in dev mode so something like `CORE_PEER_COMMITTER_LEDGER_ORDERER=0.0.0.0:5151 CORE_CHAINCODE_MODE=dev peer chaincode deploy -n mycc -c '{"Args":["init","a","100","b","200"]}’`

damiang
2016-10-26 16:00
Ok, thanks

jjmiranda
2016-10-26 19:02
has joined #fabric

bsm117532
2016-10-26 20:10
has joined #fabric

prodia
2016-10-27 08:54
has joined #fabric

prodia
2016-10-27 08:56
Hello, a curious newbie here. reading from the protocol-spec, it says the transaction is encrypted with sophisticated key derivation functions to ensure only intended participants may see the content. But if it's encrypted, how can other nodes verify that the transaction is valid?

nitin
2016-10-27 09:31
has joined #fabric

garisingh
2016-10-27 09:47
@prodia - honestly at this point I would ignore the encryption stuff (and frankly the protocol spec). Work is underway on the V1 release and architecture and that is more relevant. To answer your question, in the current architecture (v0.6 release), all nodes execute and validate all transactions and therefore all have access to the contents of the transactions

prodia
2016-10-27 10:00
@garisingh Thanks for the info!

ruquan.chen
2016-10-27 10:04
has joined #fabric

simone.a
2016-10-27 15:37
has joined #fabric

nao
2016-10-27 17:04
I am trying to test the Fabric v0.7 of the orderer function. In order to use the orderer function, I need to explicitly type "make orderer". Do you have any reason that makefile dose NOT make orderer binary with just type 'make'? If so. I will send a fix patch.

muralisr
2016-10-27 17:27
@nao good point... I recall @ghaskins mentioned this too

nao
2016-10-27 17:40
@muralisr Thank you for Info. I will send a patch and wait and see.

zemtsov
2016-10-27 19:47
@zemtsov pinned a message to this channel.

kyrieleison
2016-10-28 02:57
Hi. I am trying to develop a digital ID service with Blockchain tech in Japan. Hope I could use Hyperledger in my product(http://trustdock.io). What I want to do is to combine the managed PKI technology and Hyperledger PKI to improve the security and usability. Here are some questions about Hyperledger extended PKI tech. I appriciate if you could answer. - What is TLSCA? What's the purpose? How it does being used? - What is ACA (Attribute CA) and ACert (Attribute Certificate)? What is the purpose? How it does being used? - Regarding the ECA and TCA, should they be certified by root CA? if so, where is the root CA? - Should root CA be signed by a external CA which is the outsitde of the Blockchain network?

yaoguo
2016-10-28 03:23

yaoguo
2016-10-28 03:25
@kyrieleison you can trust ECA/TCA as root CA

prodia
2016-10-28 08:02
As I understand it, ‘Transaction’ in fabric is a request to the blockchain to execute a chaincode. than, what does it actually mean to ‘validate’ a transaction?

kyrieleison
2016-10-28 09:16
@yaoguo Thanks for info!

vsbhogle
2016-10-28 10:09
has joined #fabric

vsbhogle
2016-10-28 10:09
hi....quick query....what is the minimum blocks size on fabric

vsbhogle
2016-10-28 10:09
block size*

rick.behl
2016-10-29 06:59
has joined #fabric

rick.behl
2016-10-29 07:01
Hi, there… hope someone can help with an issue trying to get a 4 PBFT node cluster with member service

rick.behl
2016-10-29 07:02

anrodon
2016-10-29 08:15
Hey there, I get this when I try to make the peer-image

anrodon
2016-10-29 08:15

anrodon
2016-10-29 08:16
I’m on OSX Sierra, anybody knows what can I do?

garisingh
2016-10-29 08:51
@anrodon - you need to install gnu-tar - `brew install gnu-tar --with-default-names`

anrodon
2016-10-29 08:51
thanks :smile:

garisingh
2016-10-29 08:51
np

garisingh
2016-10-29 08:52
for reference: https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ (nice link about moving from Linux to OSX in terms of utilities)

yacovm
2016-10-29 08:57
about the 3rd time I saw this question, maybe it's worth to include that in the docs or something for mac users?

garisingh
2016-10-29 10:09
@yacovm - agreed. I guess right now building outside of Vagrant is not treated as a "first-class" citizen. But this should probably not stop us from writing up how to do it for the "adventurous"

garisingh
2016-10-29 10:10
on the other hand, most of the questions about this come from people who should really just be using the pre-built images to start with. :wink:

anrodon
2016-10-29 10:44
and this?

anrodon
2016-10-29 10:44

anrodon
2016-10-29 11:15
Tag latest not found in repository http://docker.io/hyperledger/fabric-baseimage

anrodon
2016-10-29 11:15
what am I doing wrong here? :disappointed:


jeremysevareid
2016-10-29 11:46
has joined #fabric

anrodon
2016-10-29 11:50
sorry guys it’s up and running now

anrodon
2016-10-29 11:50
I don’t realise how to get the url to post to

abhisingh
2016-10-29 12:07
Hi!

abhisingh
2016-10-29 12:07
Please guide me how to test asset_management02 example

dave.enyeart
2016-10-29 12:45
I’ve been running end-to-end v1 with example02 all morning. Now suddenly deployment of chaincode is failing. Any ideas?

dave.enyeart
2016-10-29 12:45
In vagrant dev env

dave.enyeart
2016-10-29 12:45
12:24:50.639 [chaincode] Deploy -> DEBU 168 deploying chaincode d8f2ef95a72aa85b0f92580580176479fcd0874f6b0855ae21b98dcb926353d357e94cc80b5fb9b789d3a0acfdf143166b3bdc3e483feabeb4ab0b0a530b83a6(networkid:dev,peerid:jdoe) 12:24:50.639 [container] lockContainer -> DEBU 169 waiting for container(dev-jdoe-d8f2ef95a72aa85b0f92580580176479fcd0874f6b0855ae21b98dcb926353d357e94cc80b5fb9b789d3a0acfdf143166b3bdc3e483feabeb4ab0b0a530b83a6) lock 12:24:50.639 [container] lockContainer -> DEBU 16a got container (dev-jdoe-d8f2ef95a72aa85b0f92580580176479fcd0874f6b0855ae21b98dcb926353d357e94cc80b5fb9b789d3a0acfdf143166b3bdc3e483feabeb4ab0b0a530b83a6) lock 12:24:52.675 [dockercontroller] deployImage -> ERRO 16b Error building images: Tag x86_64-0.7.0-snapshot-0091bc9 not found in repository http://docker.io/hyperledger/fabric-ccenv 12:24:52.675 [dockercontroller] deployImage -> ERRO 16c Image Output: ******************** Step 1 : FROM hyperledger/fabric-ccenv:x86_64-0.7.0-snapshot-0091bc9 Pulling repository http://docker.io/hyperledger/fabric-ccenv

muralisr
2016-10-29 13:00
@dave.enyeart how are you running the peer ?

muralisr
2016-10-29 13:01
can you paste the line ?

dave.enyeart
2016-10-29 13:06
CORE_PEER_COMMITTER_LEDGER_ORDERER=0.0.0.0:5151 CORE_LOGGING_LEVEL=DEBUG peer node start

dave.enyeart
2016-10-29 13:07
@muralisr same thing has been working last couple days, until now

muralisr
2016-10-29 13:11
ok

muralisr
2016-10-29 13:11
do you mind trying `make clean` and `make peer` again ?

muralisr
2016-10-29 13:12
before that …can you do `which peer` please ?

dave.enyeart
2016-10-29 13:15
fabric$ which peer /hyperledger/build/bin/peer

dave.enyeart
2016-10-29 13:17
cannot make clean:

dave.enyeart
2016-10-29 13:17
vagrant@hyperledger-devenv:v0.0.10-40d56fd:/opt/gopath/src/github.com/hyperledger/fabric$ make clean docker images -q hyperledger/fabric-ccenv | xargs -r docker rmi -f Error response from daemon: conflict: unable to delete 68c8b9347018 (cannot be forced) - image has dependent child images Error response from daemon: conflict: unable to delete 68c8b9347018 (cannot be forced) - image has dependent child images Error response from daemon: conflict: unable to delete bc51dee593ad (cannot be forced) - image has dependent child images Error response from daemon: conflict: unable to delete 07a78cfafd87 (cannot be forced) - image has dependent child images make: [ccenv-image-clean] Error 123 (ignored) docker images -q hyperledger/fabric-peer | xargs -r docker rmi -f docker images -q hyperledger/fabric-membersrvc | xargs -r docker rmi -f docker images -q hyperledger/fabric-src | xargs -r docker rmi -f Error response from daemon: conflict: unable to delete 2e6f505c138d (cannot be forced) - image has dependent child images make: [src-image-clean] Error 123 (ignored) docker images -q hyperledger/fabric-javaenv | xargs -r docker rmi -f docker images -q hyperledger/fabric-orderer | xargs -r docker rmi -f

dave.enyeart
2016-10-29 13:21
ok, works now. 'make clean' 'make peer’ resolved it. thanks!

muralisr
2016-10-29 13:32
sure thing

muralisr
2016-10-29 13:32
weird though

anrodon
2016-10-29 23:04
Hey there

anrodon
2016-10-29 23:04
when I try to deploy chaincode

anrodon
2016-10-29 23:04
I get this

anrodon
2016-10-29 23:04

anrodon
2016-10-29 23:05
seems like it sends the transaction but then it has an error

anrodon
2016-10-29 23:05
I think that the problem is with the docker socket

anrodon
2016-10-29 23:05
I’m on an OSX

anrodon
2016-10-30 00:47
I think that the problem is that the vp can’t write to the vm endpoint with tcp

anrodon
2016-10-30 00:47
but I don’t know how to solve it

anrodon
2016-10-30 00:47
any idea?

anrodon
2016-10-30 00:47
I’m sure that it’s a noob error

rbright
2016-10-30 03:45
has joined #fabric

jmahhh
2016-10-30 10:18
In https://github.com/hyperledger/fabric/blob/master/examples/chaincode/go/asset_management_with_roles/asset_management_with_roles.go it says: `// Attribute 'account' is used to associate transaction certificates with account owner.` This sounds kind of funny coming from general blockchains, where a transaction is automatically associated with an account... How should I interpret this statement? Does this have something to do with privileges/privacy?

frankwg
2016-10-31 03:22
has joined #fabric

pd93
2016-10-31 13:53
has joined #fabric

mhayashi
2016-10-31 19:00
has joined #fabric

mint
2016-11-01 01:07
has joined #fabric

henryngo
2016-11-01 04:20
has joined #fabric

jetienne
2016-11-01 06:51
has joined #fabric

clyde_dcruz
2016-11-01 08:15
has joined #fabric

jhamhader
2016-11-01 08:40
has joined #fabric

pluradj
2016-11-01 13:34
has joined #fabric

adc
2016-11-01 14:03
@jmahhh in HLF, each identity (ECert) is associated to a certain set of attributes (key/value pairs). When creating a pseudonym (TCert), one can decide to export one or more of its attributes. In that example, the attribute 'account' is mapped by the chaincode to a set of assets owned by that account. Does this sound more clear?

zemtsov
2016-11-01 14:34
@adc is this working in 0.6? I try to read attributes with `ReadCertAttribute` in my chaincode, but every time I get the error `Failed retrieving extension.`

adc
2016-11-01 14:36
interesting, just a sanity check: did you enable the aca in the membersrv.yaml?

adc
2016-11-01 14:36
what do you use to send transactions, the node-sdk?

zemtsov
2016-11-01 14:52
@adc I start peers and membersrvc from images with docker-compose

zemtsov
2016-11-01 14:52

zemtsov
2016-11-01 14:52
this is my startup file

adc
2016-11-01 14:54
yeah, by default the ACA is disabled

adc
2016-11-01 14:54
so the environment must be changed

adc
2016-11-01 14:54
give me a sec to see how to do that

adc
2016-11-01 14:55
so, you should set MEMBERSRVC_CA_ACA_ENABLED=true

adc
2016-11-01 14:55
or at least, let's try if it works :slightly_smiling_face:

zemtsov
2016-11-01 14:56
@adc should this variable be set for membersrvc?

zemtsov
2016-11-01 14:57
I mean do vps require it?

adc
2016-11-01 15:06
no, only membersrvc

adc
2016-11-01 15:06
:slightly_smiling_face:

zemtsov
2016-11-01 15:10
@adc thanks. I'll try and will back to you with the result.

adc
2016-11-01 15:10
sure

adc
2016-11-01 15:10
just last thing, do you use the node-sdk to send transactions?

zemtsov
2016-11-01 15:18
Yes.

adc
2016-11-01 15:18
good, that's the right way

zemtsov
2016-11-01 15:19
I pass a list of attrs to query/invoke requests

zemtsov
2016-11-01 16:15
@adc it is better now. At least the error I was getting at the start disappeared. Thanks a lot!

adc
2016-11-01 16:16
cool :slightly_smiling_face:

ghaskins
2016-11-01 16:27
@muralisr ping

muralisr
2016-11-01 16:27
@ghaskins pong

ghaskins
2016-11-01 16:28
@muralisr so @pmullaney and I were just chatting...he mentioned that you were talking about needing to specify the metadata.Version to the chaincode build...that came as a surprise to me

ghaskins
2016-11-01 16:28
i was curious what was driving that?

ghaskins
2016-11-01 16:29
I added the metadata thing to the peer build to version it, but afaik it should only be needed by the peer

muralisr
2016-11-01 16:29
oh … I didn’t mean to say “chaincode"

muralisr
2016-11-01 16:29
to the peer

ghaskins
2016-11-01 16:29
ah, ok

muralisr
2016-11-01 16:29
right

ghaskins
2016-11-01 16:29
why "go build" and not "make peer" ?

ghaskins
2016-11-01 16:30
fwiw, "make peer" should be synthesizing the metadata parameter for you

muralisr
2016-11-01 16:30
right

ghaskins
2016-11-01 16:30
is there a use case that demands manual override?

muralisr
2016-11-01 16:30
I suggested that as the better alternative to “./peer"

muralisr
2016-11-01 16:31
I think @pmullaney was just used to the `./peer`

rangao
2016-11-01 16:31
has joined #fabric

ghaskins
2016-11-01 16:32
ah..i am perhaps a bit biased, but I highly suggest to use the makefile :wink:

ghaskins
2016-11-01 16:32
brb

muralisr
2016-11-01 16:46
:slightly_smiling_face:

muralisr
2016-11-01 16:46
when you have moment, have a q for you @ghaskins

ghaskins
2016-11-01 16:48
sure thing, shoot

muralisr
2016-11-01 16:55
so working on https://gerrit.hyperledger.org/r/#/c/2127 and @cbf made the excellent point that we don’t need `generateHashcode` for the car platform (in https://gerrit.hyperledger.org/r/#/c/2127/2/core/chaincode/platforms/car/package.go) now that user is specifying the chaincode name

muralisr
2016-11-01 16:56
Other platforms do need to compute the package but CAR does not even need that

muralisr
2016-11-01 16:56
can I remove it ?

ghaskins
2016-11-01 16:58
let me study it

muralisr
2016-11-01 16:59
thanks

jvah
2016-11-01 19:06
has joined #fabric

guang384
2016-11-01 19:12
has joined #fabric

vijayr24
2016-11-01 20:36
Hi all, I am trying to make a rest call from the to the peer deployed using docker. My chaincode is compiling without errors and I trying to invoke the chain code using a REST client, I am getting the following error message, "code":-32602,"message":"Invalid params","data":"Payload must contain a CtorMsg with a Chaincode function name." This is the request body, { "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID": { "path": "http://github.com/chaincode_example02", "name": "mycc" }, "ctorMsg": { "function": "init" } }, "id": 1 } response: { "jsonrpc": "2.0", "error": { "code": -32602, "message": "Invalid params", "data": "Payload must contain a CtorMsg with a Chaincode function name." }, "id": 1 }

vijayr24
2016-11-01 20:49
When I test it using swagger, i get the following error "transport: http2Server.HandleStreams received bogus greeting from client: "OPTIONS /chaincode HTTP/""

ermyas
2016-11-01 22:40
has joined #fabric

vdods
2016-11-02 00:10
has joined #fabric

vdods
2016-11-02 00:11
@vijayr24 I haven't tested this, but I believe you have to change the chaincode ID path to http://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 and also add another attribute to the ctorMsg dict of the form "args":["a","100", "b","200"]

oiakovlev
2016-11-02 00:50
@adc QQ regarding discussion above: I realize that SDK is the correct way to issue transations but if we have client already built on top of REST calls can we use attributes from cert or there will be some limitations? again this is PoC and we don't want to rewrite everything and I know that REST has been removed from master already :slightly_smiling_face:

vsbhogle
2016-11-02 05:36
from fabric code I can see that minimum block size is 1024 and maximum block size is 65536....I hope I am right on this..

adc
2016-11-02 07:12
@oiakovlev unfortunately REST cannot be use to drive those chaincodes, sorry for that :disappointed:

oiakovlev
2016-11-02 07:12
thanks @adc

vdods
2016-11-02 07:26
@vdods has left the channel

michaelwang
2016-11-02 07:33
has joined #fabric

ikruiper
2016-11-02 09:06
Hi, based on this comment about the GetTxTimestamp() method from the ChaincodeStubInterface: ``` // GetTxTimestamp returns transaction created timestamp, which is currently // taken from the peer receiving the transaction. Note that this timestamp // may not be the same with the other peers' time. GetTxTimestamp() (*timestamp.Timestamp, error) ``` I am not quite sure here, but is it correct to assume that the GetTxTimestamp() is deterministic within a chaincode execution since it seems to be generated by the first peer receiving the transaction (even though it would have been potentially different if initially broadcasted via a different peer)? In other words, can we rely on this to be providing the same consistent value within the chaincode on each of the peers for a given transaction?

mike_wall
2016-11-02 09:25
has joined #fabric

jmahhh
2016-11-02 11:03
@adc better, thanks, although that comment makes it sound as if you can somehow map _to_ ECert instead of to the chaincode

stevenroose
2016-11-02 12:25
I cannot seem to install peer: ``` $ go install # http://github.com/hyperledger/fabric/vendor/github.com/tecbot/gorocksdb ../vendor/github.com/tecbot/gorocksdb/backup.go:4:24: fatal error: rocksdb/c.h: No such file or directory // #include "rocksdb/c.h" ^ compilation terminated. ```

stevenroose
2016-11-02 12:25
I found some very old issues from OpenBlockchain that suggested setting env variables for the go install command, but none of them works

mike_wall
2016-11-02 12:28
@stevenroose you should install rocksdb

stevenroose
2016-11-02 12:29

stevenroose
2016-11-02 12:29


mike_wall
2016-11-02 12:29
this guide helped me

mike_wall
2016-11-02 12:30
I don't install gcc 4.8, I had newer one

stevenroose
2016-11-02 12:30
ah ok, I did not know that I needed rocksdb

mike_wall
2016-11-02 12:31
but I got another error bcs gorocksdb have not working build in master branch

stevenroose
2016-11-02 12:31
that will solve it (I'm on Arch, so I just install the package for it)

stevenroose
2016-11-02 12:31
ah

stevenroose
2016-11-02 12:31
workaround?

mike_wall
2016-11-02 12:31
I forked their repo and revert to working one

stevenroose
2016-11-02 12:32
Have to go, will be back in an hour or so

mike_wall
2016-11-02 12:32
copy this folder to fabric

mike_wall
2016-11-02 12:32
but still not working :disappointed:

astepanov
2016-11-02 12:42
has joined #fabric

astepanov
2016-11-02 13:00
Hi everyone! Is anybody use JSON representation of rows and HFC? I'm using following code to build json ``` var rows []shim.Row jsonRows, err := json.Marshal(rows) ``` And got something like this as a result in my js code ```[{"columns": [ {"Value":{"String_":"Andrey"}}, {"Value":{"String_":"00112334566"}}, {"Value":{"Uint64":1000}} ]}]``` The question is, how can I (and should I) use the values like "String_", "Uint64" on the client side? May be there is something for automatic type mapping in HFC what I miss?

stevenroose
2016-11-02 13:56
@mike_wall I'm back. Installed RocksDB. Now get this: ``` $ go install # http://github.com/hyperledger/fabric/vendor/github.com/tecbot/gorocksdb ../vendor/github.com/tecbot/gorocksdb/options.go:328: not enough arguments in call to _Cfunc_rocksdb_options_set_compression_options ```

stevenroose
2016-11-02 13:56
Is there a dependency overview of any kind?

mike_wall
2016-11-02 13:56
I'm getting this too

stevenroose
2016-11-02 13:56
With versions?


mike_wall
2016-11-02 13:57
they are getting same errors

donovanhide
2016-11-02 13:59


donovanhide
2016-11-02 14:00
Oh, this is a new one :slightly_smiling_face:

stevenroose
2016-11-02 14:16
it was fixed with the same update

stevenroose
2016-11-02 14:16
made a CR for it

zemtsov
2016-11-02 15:48
@adc Hi, can I ask one more question about certificates and attributes?

vijayr24
2016-11-02 16:31
@vdods : The issue was not with the path, it was with ctorMsg, i sent it as args["init"] and it worked fine

vijayr24
2016-11-02 17:27
1) I am trying to add a new user in the membersrvc.yaml file 2) when I am trying to use the registrar API to register my user, I am getting the following error "Identity lookup error: sql: no rows in result set" request: { "enrollId": "administrartor", "enrollSecret": "password" } response: { "Error": "rpc error: code = 2 desc = \"Identity lookup error: sql: no rows in result set\"" } any help is appreciated

vijayr24
2016-11-02 19:16
Hi all, any idea how to fix this error : transport: http2Server.HandleStreams received bogus greeting from client: "GET /registrar/jim HTTP/"

vijayr24
2016-11-02 19:16
I am trying to call the peer from my node.js server

vijayr24
2016-11-02 21:27
Does anyone have an idea what is the latest docker version and where can I find it?

tedy
2016-11-02 22:28
@vijayr24 did ubadd the eid/password to the membersrvc.yaml file ..before useing the registrar API

vijayr24
2016-11-02 22:34
@tedy: Yes I did add the eid and password to the membersrvc.yaml file under the users section of "eca" before using the registrar API

vijayr24
2016-11-02 22:35
i also shutdown and restarted my peer every time I made some changes to the membersrvc.yaml file

tedy
2016-11-02 22:35
U need to restart ur membersrvc container ..so it loads the values into the db

tedy
2016-11-02 22:36
Did u restart the membersrvc container?

tedy
2016-11-02 23:28
@vijayr24 did it work?

vijayr24
2016-11-03 03:53
I used the docker approach so I shutdown the docker processes fabric-peer and fabric-membersrvc. I restarted them

vijayr24
2016-11-03 03:53
is this the way to restart the membersrvc container? or is there another way to do it?

vijayr24
2016-11-03 03:54
thank you for your help @tedy

tedy
2016-11-03 04:02
@vijayr24 great... but u can just restart the memberservc

tedy
2016-11-03 04:02
using docker restart containerID

liuzl123
2016-11-03 13:23
has joined #fabric

rajeshsubhankar
2016-11-03 14:31
`transport: http2Server.HandleStreams received bogus greeting from client: "POST /registrar HTTP/1.1"` Getting this error for all my rest calls after taking latest fabric repo. Everything was working fine with V0.6.0 . Can anyone help me out ? I am working in vagrant env.

vijayr24
2016-11-03 14:58
@tedy: I will try restarting the docker containers and test it again

nikileshsa
2016-11-03 15:11
@rajeshsubhankar. By latest, are you talking about the code from Master branch? may be its because of this https://jira.hyperledger.org/browse/FAB-930? Recently they removed support the REST calls that was part of the peer from master. @jzhang can confirm :slightly_smiling_face:

vijayr24
2016-11-03 15:16
@nikileshsa: I am also getting the same error transport: http2Server.HandleStreams received bogus greeting from client: "POST /registrar HTTP/1.1". I am using the docker method...i recently updated my containers to the latest code

jzhang
2016-11-03 15:21
@vijayr24 @rajeshsubhankar REST API is disabled by default in master, you can re-enable it by passing an env variable CORE_REST_ENABLED=true, however note that the REST API will eventually be removed from the Peer.

jzhang
2016-11-03 15:22
they are definitely useful but the Peer is not the right place to host it, at least not the APIs that require user identity (deploy, send transaction, query, etc.)

jzhang
2016-11-03 15:22
the SDK team is planning to add a way for REST APIs to be easily enabled based on the SDK library


vijayr24
2016-11-03 15:24
@jzhang: Should I add CORE_REST_ENABLED=true in the docker compose yaml file? Could you also help me with this too? 1) I am trying to add a new user in the membersrvc.yaml file 2) when I am trying to use the registrar API to register my user, I am getting the following error "Identity lookup error: sql: no rows in result set" request: { "enrollId": "administrartor", "enrollSecret": "password" } response: { "Error": "rpc error: code = 2 desc = \"Identity lookup error: sql: no rows in result set\"" }

jzhang
2016-11-03 15:24
@vijayr24 yes, for the peer service in docker compose

vijayr24
2016-11-03 15:24
Thank you!

jzhang
2016-11-03 15:25
the error above is typically caused by the member service store and client’s keyvalue store getting out of sync

jzhang
2016-11-03 15:26
since you are using the REST API, the “client” in this case is the Peer, so the key value store would be in /var/hyperledger/production. that’s also where the member service store is. so you can delete that folder and re-start the member service and Peer

rajeshsubhankar
2016-11-03 15:45
@jzhang Thanks for the help. Although able to register client with REST but deploy transaction is failing. `URL: /chaincode ERROR: runtime error: invalid memory address or nil pointer dereference`

jzhang
2016-11-03 15:46
can you paste your POST request?

rajeshsubhankar
2016-11-03 15:48
```{ "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID": { "path": "http://github.com/hyperledger/fabric/projects/inCar/src/" }, "ctorMsg": { "function": "init", "args": [ ] }, "secureContext": "jim" }, "id": 0 }```

rajeshsubhankar
2016-11-03 15:49
`POST 0.0.0.0:7050/chaincode`

rajeshsubhankar
2016-11-03 15:56

grapebaba
2016-11-04 13:49
guys, i have a question about if right now we start a project, should I choose 1.0 or o.6? I know 1.0 has good performance but i am not sure when it can release


pd93
2016-11-04 14:10
The doc suggests March for v1.0, but it could be later. If you're looking to get a project out before then, I'd use 0.6. Just try and avoid the REST API if you can, as my understanding is that it won't work if you update to v1.0 later on

cbf
2016-11-04 14:14
@grapebaba we will be cutting a 1.0-preview release soon, but right now it isn’t quite there yet

cbf
2016-11-04 14:14
maybe next week

cbf
2016-11-04 14:15
this will be the first of a series in the march towards v1.0 in March

grapebaba
2016-11-04 15:05
cool

grapebaba
2016-11-04 15:06
i hope i can use 1.0 preview

grapebaba
2016-11-04 15:07
@pd93: i have a concern about writing chaincode

grapebaba
2016-11-04 15:08
as 1.0 suggest document db, maybe impact chaincode development

pd93
2016-11-04 15:19
@grapebaba Could you elaborate a bit? I'm not sure I understand your concern

grapebaba
2016-11-04 15:30
chaincode table not recommend anymore

ptippett
2016-11-04 15:44
has joined #fabric

james
2016-11-04 16:14
has joined #fabric

dave.enyeart
2016-11-04 17:59
@grapebaba @pd93 I think the only thing we can say definitively is that you will be best positioned if you model chaincode data as JSON. This will ensure support whether using key/value state database or JSON document state database (such as CouchDB), which provides query function against the chaincode (JSON) data

mrshah
2016-11-04 20:37
``` logging: peer: warning node: info network: warning chaincode: warning version: warning ``` Can someone point me to a doc that explains what each one of `peer`, `node`, `network`, `version` means?

mrshah
2016-11-04 20:37
maybe I am missing something here

ghaskins
2016-11-04 21:13
@ghaskins uploaded a file: https://hyperledgerproject.slack.com/files/ghaskins/F2ZC1A0S3/-.c and commented: for this patch, goimports tells me to remove the os import….lovely

ghaskins
2016-11-04 21:15
ok, I got past it in a weird way, and its not the first time i’ve seen this

ghaskins
2016-11-04 21:16
it seems sometimes goimport throws an error for perfectly fine code…but if you correct it with gofmt first, gofmt makes a different recommendation and then goimport passes

ghaskins
2016-11-04 21:16
chalk that up to “golang experience”, I guess

ghaskins
2016-11-04 21:17
@ghaskins uploaded a file: https://hyperledgerproject.slack.com/files/ghaskins/F2XUVNCCQ/-.diff and commented: gofmt made this recommendation

ghaskins
2016-11-04 21:18
@cbf @sheehan any memory of why we dont run gofmt in the linter?

ghaskins
2016-11-04 21:18
it seems (from a data sample of 3) that gofmt is more reliable than goimports, heh

cbf
2016-11-04 21:18
I don’t recall…. it could be because everything was in such bad shape;-)

ghaskins
2016-11-04 21:19
heh

ghaskins
2016-11-04 21:19
ill experiment with doing a full pass

ghaskins
2016-11-04 21:19
i have a patch to clean up the linter logic anyway

sheehan
2016-11-05 02:21
I think it's because `goimports` includes `gofmt`


ghaskins
2016-11-05 02:26
@sheehan ah, ok...it seems to give different results though

ghaskins
2016-11-05 02:26
could be the way its being invoked I suppose

sheehan
2016-11-05 02:26
yeah, I think there are some extra flags on one of them

ghaskins
2016-11-05 02:26
or perhaps a discrepancy between the gofmt binary and the one embedded in goimports

sheehan
2016-11-05 02:29
`gofmt` has a `-s` flag which is `Try to simplify code (after applying the rewrite rule, if any).` I know some gofmt tools automatically run it with the `-s` flag. I believe it's not possible to include the `-s` flag with `goimports`

ghaskins
2016-11-05 02:29
ah, thats probably what it is

ghaskins
2016-11-05 02:30
in any case, it seems that goimports/gofmt-s might have a bug

ghaskins
2016-11-05 02:30
i have seen this before where it will strip imports that are actually used, resulting in code that wont compile

ghaskins
2016-11-05 02:30
workaround was to run gofmt -w first and then goimports

sheehan
2016-11-05 02:36
that's odd. I would have assumed goimports essentially ran that same command before fixing the imports

grapebaba
2016-11-05 04:36
@dave.enyeart: i am afraid i cannot implement complex query when use key value database

grapebaba
2016-11-05 08:43
@dave.enyeart: i am afraid i cannot implement complex query when use key value database

sidthekid
2016-11-05 14:28
has joined #fabric

aleixmorgadas
2016-11-05 20:55
has joined #fabric

mawasthi
2016-11-06 18:07
has joined #fabric

prodia
2016-11-07 05:03
Hello guys, is v1.0 the same thing as v0.6.1?

jinyu
2016-11-07 06:47
has joined #fabric

mdelmott
2016-11-07 08:13
has joined #fabric

mdelmott
2016-11-07 08:23
Hi everybody, I would like to know how to deploy a chaincode in Bluemix and call it with the bluemix blockchain service or with another web application.

hiepnm
2016-11-07 09:22
has joined #fabric


mdelmott
2016-11-07 12:34
@garisingh thank you

tuand
2016-11-07 13:52
#prodia, lots of changes from v0.6 to v1 ... more information on the wiki https://wiki.hyperledger.org/community/fabric-design-docs

astepanov
2016-11-07 15:06
Is anyone could please explain (or direct me to the page, where it's explained) how affiliations part of membersrvc.yaml works? I mean what is it for? ```eca: affiliations: banks_and_institutions: banks: - bank_a - bank_b - bank_c institutions: - institution_a```

axc
2016-11-07 18:52
Is it possible to not use `membersrvc.yaml` or use another name instead such as `membersrvc2.yaml`? Currently it seems like it is hardcoded in `server.go` I have two different projects that should ideally use two different files

ghaskins
2016-11-07 18:59
@axc I am fairly sure there is NOT a way to use a different name without patching the code, but one thing you can do is manage it with CWD

ghaskins
2016-11-07 19:00
this is what I do


yacovm
2016-11-08 05:45
Fixed the bug yesterday, rebase and it'll work :slightly_smiling_face:

yacovm
2016-11-08 05:46
It's because CI doesn't always spawn a goroutine fast enough anyway

bguilloteau
2016-11-08 13:13
has joined #fabric

nakao
2016-11-08 14:06
has joined #fabric

arulmurugan
2016-11-09 09:28
has joined #fabric

mikezaccardo
2016-11-09 15:18
Hi, will this Docker image [https://hub.docker.com/r/hyperledger/fabric-membersrvc/] be changing soon, given the repository split? If so, would it be possible to save the current `latest` (Last pushed: 20 days ago) as a separate tag? Many thanks.

garisingh
2016-11-09 15:19
@mikezaccardo - no - it won't be changing - and it's already built off of the v0.6.1-preview tag

garisingh
2016-11-09 15:20
it's pretty much the last we should push unless we find a defect

garisingh
2016-11-09 15:20
unless @ghaskins disagrees :wink:

ghaskins
2016-11-09 15:20
@mikezaccardo really, the :latest tag needs to probably go away, but there was stuff that broke without it so I put it back for now

ghaskins
2016-11-09 15:21
but that said, the root of your question about saving it off: it already is

ghaskins
2016-11-09 15:21
we explicitly tag everything first anyway (as @garisingh mentioned)

ghaskins
2016-11-09 15:22
@garisingh it is my understanding that the general community doesnt have any intention of pushing any more v0.6 releases

ghaskins
2016-11-09 15:22
whether that is a tenable for all is another matter, I suppose

ghaskins
2016-11-09 15:23
(for instance, I am not sure if there will be too large of a stability gap between v0.6.1 and master to make that realistic)

ghaskins
2016-11-09 15:24
my gut feeling is, its not realistic...but I also can appreciate the desire to focus on the new

garisingh
2016-11-09 15:24
sure - but specific to membersrvc we should not have another build unless we find some bugs

ghaskins
2016-11-09 15:24
oh, sorry, i missed that detail

ghaskins
2016-11-09 15:24
agreed

ghaskins
2016-11-09 15:24
I was taking v0.6 in general

ghaskins
2016-11-09 15:25
brb

mikezaccardo
2016-11-09 15:27
Thanks @ghaskins @garisingh — to rephrase my question, given the split in the repository, will there be a new :latest published soon that will change the way membership services functions?

garisingh
2016-11-09 15:27
nope

mikezaccardo
2016-11-09 15:28
Cool, that’s a relief

axc
2016-11-09 21:41
I ran the asset_management_with_roles example and got the following outputs: "msg":"Error:Failed to launch chaincode spec(Could not get deployment transaction for ed017204add711b658163069dfd4150ddb23f9d9438345aa21d06cc1ab711da9 - LedgerError - ResourceNotFound: ledger: resource not found)"} ok 3 assign successful 1..3 # tests 3 # pass 2 # fail 1 Has anyone gotten something similar before?

jackkleeman
2016-11-09 21:48
Yes, this means you are running a query before the deployment has finished

jackkleeman
2016-11-09 21:48
At least, I got that error for that reason in the past. Alternatively it means that your deployment failed entirely.

ankitkamra
2016-11-10 03:20
Hi All, can any one help me to setup Non validating peer in hyperledger fabric ?

ankitkamra
2016-11-10 03:20
Thanks in advance

mikezaccardo
2016-11-10 15:28
Hi, is there some kind of community repository for chaincodes / applications? I’d like to run examples beyond what’s provided in [https://github.com/hyperledger/fabric/tree/master/examples]. Thanks!

mikezaccardo
2016-11-10 15:31
@axc Like what @jackkleeman mentioned, I’ve seen that problem as well when querying too early. Increasing the sleep time between deploy and query should solve the problem (assuming everything else is set up and deployed properly).

garisingh
2016-11-10 15:33
@mikezaccardo - if you have some ideas on starting something up, that would be great. we did a couple examples from an IBM perspective but we've been looking for a community home as well. We have a few of our apps and chaincodes at https://github.com/IBM-Blockchain

axc
2016-11-10 15:36
@mikezaccardo I am running the asset management with roles example straight from Github, it comes with its own unit tests and I didn't change anything. So it shouldn't have been a problem

mikezaccardo
2016-11-10 15:44
@axc My first thoughts are that the sleep values set in that test are insufficient for you cluster size or CPU resources

mikezaccardo
2016-11-10 15:45
@garisingh Thanks for those resources!

liuhaidl
2016-11-10 17:59
has joined #fabric

divyank
2016-11-10 20:58
has joined #fabric

dennism330
2016-11-10 23:52
has joined #fabric

jinyu
2016-11-11 03:20
How could I integrate customized CA into fabric??

chris.zhenghf
2016-11-11 03:58
has joined #fabric

ankitkamra
2016-11-11 04:50
Hy All, As we know once we enrolled a user to CA and its token created after that we can't use same credentials it will give error of "Error: identity or token do not match"

ankitkamra
2016-11-11 04:50
So, my question is that how can i reuse the token from client side using java sdk

mikezaccardo
2016-11-11 05:34
Hi, I’m attempting to split the asset management demo [https://github.com/hyperledger/fabric/tree/master/examples/chaincode/go/asset_management] into separate applications, one for each step: deployment, ownership assignment, and ownership transfer. The first application runs fine, but the second one fails — I’ve figured out that it’s because I need to generate another TCert for the “bob” user, but it's not the same as the one generated in the first application, performed here: [https://github.com/mikezaccardo/fabric/commit/a7471d8ecb873533fa82233fab7f9c167ce26820#diff-6ae780dac4abd9e4c1e7f0530474b734R55]. Is there an elegant way around this problem? Should I serialize the TCert that is created in the first application? Or perhaps I’m not undestanding the cert model properly. Thanks for any help!

mikezaccardo
2016-11-11 05:35

jinyu
2016-11-11 05:50
How could I integrate third party CA into fabric?? thanks : )

shinsa
2016-11-11 06:47
has joined #fabric

warm3snow
2016-11-11 07:39
Wait for the next version v1.0. I think now you can't do that @jinyu

yacovm
2016-11-11 07:56
@jinyu you should ask that in #fabric-crypto

jinyu
2016-11-11 07:59
@warm3snow @yacovm thanks, look forward to it.

ankitkamra
2016-11-11 10:20
hy all, i am using java sdk to implement demo over hyperledger fabric. I am able to communicate like user enrollment using http post but not able to communicate over grpc protocol

muralisr
2016-11-11 13:13
@ankitkamra I’m assuming you are using 0.6 ?

jonathanlevi
2016-11-11 15:52
@jklepach

jklepach
2016-11-11 15:52
has joined #fabric

jonathanlevi
2016-11-11 15:54
Hi, @jkilpatr (Justin) so a few things are working if your favor:

jkilpatr
2016-11-11 15:54
has joined #fabric

jonathanlevi
2016-11-11 15:55
1. The licensing. You can package the entire code base in a commercial solution.

kroisin
2016-11-11 15:55
has joined #fabric

jonathanlevi
2016-11-11 15:55
2. You are still allowed to tweak it, to your liking - e.g. build it on CentOS or Red Hat

jonathanlevi
2016-11-11 15:55
3. Host or deploy it separately.

jonathanlevi
2016-11-11 15:56
---

jonathanlevi
2016-11-11 15:56
Now, as for Docker (which has kinda become the “market standard” way of approaching virtualization/versioning, at least in the DevOps and “dev” world…)

jonathanlevi
2016-11-11 15:57
You can either use these directly (images are published to docker hub… that you can extend)

jonathanlevi
2016-11-11 15:57
Or you can build custom ones yourself. The latest (master) is using Ubuntu 16.04, but this should not prevent you from using it, say, with Red Hat.

jkilpatr
2016-11-11 15:58
already half way to building a custom one, can't link rocksdb

jkilpatr
2016-11-11 15:58
looks to me like api issues, so I probably just need to dig into the existing dev image and find their exact version of rocksdb

jonathanlevi
2016-11-11 15:59
I don’t want to use this forum for marketing our (Hacera) framework, but we have our own set of build and local tests, always checking the stuff that we are using in fabric - so that whenever/before we “upgrade” the underlying, we verfiy that what we rely on, works.

jonathanlevi
2016-11-11 15:59
---

jonathanlevi
2016-11-11 16:00
Oh, in that sense, yes - you can simply look at how the dependencies are being resolved. That’s just a small (technical) bump in the road...

jonathanlevi
2016-11-11 16:00
You can (already) use it outside the box, but yes, for a local/custom build - you’d have to work this out.

jonathanlevi
2016-11-11 16:00
But if you share some of the exact errors, I/we might be able to assist more.

jkilpatr
2016-11-11 16:02

jkilpatr
2016-11-11 16:02
@jonathanlevi the technical bump is immediate but minor. Overall though I don't feel like I understand how the whole project comes together.

jonathanlevi
2016-11-11 16:03
Sure (invited you also to fabric-dev). Apologies if I’m being too welcoming :wink:

jkilpatr
2016-11-11 16:03
no that's fine, great actually

jonathanlevi
2016-11-11 16:03
Right - would you like me to point you to some of the docs/Wiki ?

sumitks
2016-11-11 16:03
has joined #fabric

jonathanlevi
2016-11-11 16:05

jkilpatr
2016-11-11 16:05
I've read most of the docs I could find and a couple of the research papers. I get the concepts but I'm missing details, so fabric does the actual communication and you can plug in different security methods (POW, POS, then this sawtooh lake stuff)


jonathanlevi
2016-11-11 16:06
Missing details as in?

jkilpatr
2016-11-11 16:06
I guess the doc I'm looking for would be "shipping your frabic based app" and a list of the minimum things you need to do to get somthing shippable. I don't really need that at this stage but I don't get a -> b there.

jkilpatr
2016-11-11 16:07
what does fabric come with by default, what do I need to add? what components does it depend on?

jkilpatr
2016-11-11 16:07
that sort of junk.

jonathanlevi
2016-11-11 16:10
Yes, my suggestion is to focus first on the core fabric features. The plugable architecture is something that’s in the making (for v1.0).

jonathanlevi
2016-11-11 16:11
CORRECTION: That’s not `junk`, these are the important details! I think you are asking the right questions.

jonathanlevi
2016-11-11 16:11
Hmmm (thinking).

jonathanlevi
2016-11-11 16:11
Do you have a use-case that you want to see how you can develop/implement using Fabric, say?

jonathanlevi
2016-11-11 16:12
Otherwise, maybe a better overview will be useful?

jkilpatr
2016-11-11 16:13
not really. I probably just need to sit down and spend a day or two mapping everything out, all the containers don't help on the dev level because its hard to tell when we are using a container to handle dependencies and when we are using a container to simulate another machine that would be part of the network.

garisingh
2016-11-11 16:14
@jkilpatr - I look at things this way: 1) Fabric provides the basic blockchain infrastructure platform 2) Chaincode gives Fabric a purpose - meaning you might implement chaincode which does commercial paper, car leasing, mortgage, etc 3) The various SDKs (Node and Java (in progress)) allow you to build applications which interface with the Fabric and your chaincode

garisingh
2016-11-11 16:15
if you break out 1), you'll have a bunch of participants who are hosting Fabric nodes

jkilpatr
2016-11-11 16:15
so chaincode is a set of transactions and responses / actions on the part of the network? I read that paper and found it interesting.

jkilpatr
2016-11-11 16:16
ok so programs built on fabric are one network with many different chaincode implementations or are they different networks with different chaincode?

garisingh
2016-11-11 16:22
You'll basically have a bunch of companies and/or individuals who get together and decide to solve a business problem and/or create a new business using blockchain technology. When they choose Fabric, a bunch of them will decide to actually run the "nodes / peers" which make up the network. They'll build and deploy chaincode to solve their business domain and then build applications which submit transactions / query the blockchain for data. There's nothing which would prevent a single network from serving multiple business domains, it would all depend on the needs / business models of the participants for any given network. Of course some industries have regulations which would inherent require a more closed / private network so you'll end up with multiple networks in the end

jkilpatr
2016-11-11 16:24
ok that explains a lot, thakns @garisingh, i think some of my issue was trying to categorize a meta-project into doing one thing

kpandey
2016-11-11 17:43
has joined #fabric

ds
2016-11-11 18:17
has joined #fabric

ankitkamra
2016-11-12 04:39
@muralisr yes i am using hyperledger fabric 0.6

wangbin767
2016-11-12 13:06
Hi everyone, I got a small question when I learn the fabric. In the tutorial, it indicate that I should run the chaincode in the CLI and then deploy it. I would like to know if I shutdown the machine which running the chaincode application, of course there are still other peers running in the network, could I still be able to using the function of the chaincode? like invoke and query

yacovm
2016-11-12 13:07
the chaincodes run for each peer alive

yacovm
2016-11-12 13:07
so if you shutdown a peer and its chaincode container, you still have the others

yacovm
2016-11-12 13:07
but keep in mind- if you use PBFT you need to shutdown up to `f` peers, else you'll be in trouble

wangbin767
2016-11-12 13:08
what if I shutdown all the peers and restart them, do I need to redeploy the chaincode? or just be able to use the chaincode as soon as the peers back to live

yacovm
2016-11-12 13:10
hmmm actually I don't know, never tried that before.

wangbin767
2016-11-12 13:11
thanks, is there anyone know?

yacovm
2016-11-12 13:11
wait until someone answers, I guess

wangbin767
2016-11-12 13:12
just curious about the whether do I need to keep the chaincode application running on any one of the peers

garisingh
2016-11-12 14:26
Chaincode deployed in production mode should stay running

garisingh
2016-11-12 14:26
If it goes down, the peer should restart it the next time it is invoked / queried

ghaskins
2016-11-12 15:36
It probably should be noted that there are various degrees of "should" and "what it does in version x"

ghaskins
2016-11-12 15:37
But I think we all agree that the end goal is, operators need not be concerned with this: the peer will manage the platform

ghaskins
2016-11-12 15:37
Just not sure that will all work today

subzer0
2016-11-12 20:16
has joined #fabric

wale
2016-11-13 01:08
has joined #fabric

wangbin767
2016-11-13 09:28
I would like to know in fabric, is that all the transaction data are stored on each of the peers?

yacovm
2016-11-13 13:12
yes

ac0rn
2016-11-14 03:02
has joined #fabric

ankitkamra
2016-11-14 06:29
Hey everyone, i am running fabric 0.6 with tls enable for rest services. I am getting error :- x509: certificate has expired or is not yet valid.| Can anyone please help me to resolve the issue.

madhavi
2016-11-14 08:55
Hi, i start a peer as 'peer node start' but i am getting error as 08:55:12.824 [peer] chatWithPeer -> ERRO 02d Error creating connection to peer address 172.17.0.2:7051: grpc: timed out when dialing

madhavi
2016-11-14 08:55
how to solve it

ankitkamra
2016-11-14 09:07
@madhavi you need to connect the peer on correct ip/port. please verify ip and port of peer to which you are trying to connect

madhavi
2016-11-14 09:26
help me how to check ip and port of peer

madhavi
2016-11-14 09:26
if u start one peer i think no need of giving any ip or port right?

ankitkamra
2016-11-14 09:29
yes if you starting single peer there is no need to give ip

ankitkamra
2016-11-14 09:29
are you using docker-compose or using CLI ?

madhavi
2016-11-14 09:51
i am using CLI

ankitkamra
2016-11-14 10:26
which commands you are using ?

madhavi
2016-11-14 10:30
peer node start

ankitkamra
2016-11-14 10:31
peer node start --peer-chaincodedev

ankitkamra
2016-11-14 10:31
try this

py
2016-11-14 12:38
has joined #fabric

ivglavas
2016-11-14 14:00
has joined #fabric

vdods
2016-11-14 21:37
has joined #fabric

vdods
2016-11-14 21:38
Hi all, is there some sort of yearly event/conference for Hyperledger, or that Hyperledger is a part of?

5erj
2016-11-15 00:44
has joined #fabric

5erj
2016-11-15 00:45
Hi guys, I'm running into problems when trying the `peer chaincode` commands as specified in the documentation at: http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Chaincode-setup/#running-the-cli-or-rest-api when using the Vagrant setup (option 1), so I was wondering if there are currently any known issues with that setup?

5erj
2016-11-15 00:46
specifically `peer chaincode deploy` seems to require a path parameter `-p` to successfully run.

5erj
2016-11-15 00:47
and `peer chaincode invoke` is throwing the following error: ``` Error: Error endorsing chaincode: rpc error: code = 2 desc = Error deploying chaincode: Failed to launch chaincode spec(Could not get deployment transaction from LCCC for mycc - Error deploying chaincode: Transaction or query returned with failure: transaction not found default/mycc) ```

5erj
2016-11-15 00:48
(note: running peer in dev mode with security not enabled)

muralisr
2016-11-15 00:55
@5erj are you running in master ?

muralisr
2016-11-15 00:56
or 0.6 ?

5erj
2016-11-15 01:49
@muralisr Running in master.

muralisr
2016-11-15 02:00
@5erj can you paste the deploy command you are using

muralisr
2016-11-15 02:00
?

5erj
2016-11-15 02:19
@muralisr `vagrant@hyperledger-devenv:v0.2.1-7e7e23c:/hyperledger/examples/chaincode/go/chaincode_example02$ peer chaincode deploy -n mycc -p . -c '{"Args": ["init", "a","100", "b", "200"]}'`

5erj
2016-11-15 02:20
I had to include the `-p` param because the command was requiring it.

5erj
2016-11-15 02:20
here's what I see on the running chaincode output:

5erj
2016-11-15 02:20

muralisr
2016-11-15 02:21
can you try `CORE_CHAINCODE_MODE=dev peer chaincode deploy -n mycc -c '{"Args": ["init", "a","100", "b", "200"]}’`

5erj
2016-11-15 02:22
should I restart the peer and chaincode first?

muralisr
2016-11-15 02:23
yes

5erj
2016-11-15 02:25
yep, that went through. So do I have to start the peer, chaincode and run the commands in the same shell session?

5erj
2016-11-15 02:27
(assuming that starting the peer in dev mode sets that variable already in the shell)

5erj
2016-11-15 02:28
The `invoke` still throws the same error though.

muralisr
2016-11-15 02:31
are you running the orderer ?

5erj
2016-11-15 02:31
nope

muralisr
2016-11-15 02:34
@muralisr uploaded a file: https://hyperledgerproject.slack.com/files/muralisr/F31SUN4P3/simple_test_with_skeletal_peer.md and commented: I really suggest you use 0.6 while the master is being worked upon.. but the above should help you try out the limited capabilities

muralisr
2016-11-15 02:34
you don’t need `CORE_CHAINCODE_MODE=dev` in 0.6 in `peer chaincode deploy ….`

5erj
2016-11-15 02:36
ok, thanks a bunch. Will try 0.6.

muralisr
2016-11-15 02:36
ok

ledger888
2016-11-15 04:57
has joined #fabric

garisingh
2016-11-15 13:42
@vdods - as of now, there's no yearly conference but there are regular "hackathon" events where members of the community get together

bfuentes
2016-11-15 14:57
@vdods @garisingh I gave Hyperledger workshop session @ Devoxx Belgium last week. Maybe I will be at Interconnect 2017 or Devoxx US 2017 with almost same content. For hackathons or meetup , it is announced normally.

fan.torchz
2016-11-15 23:18
has joined #fabric

ankitkamra
2016-11-16 03:18
Hey All, fabric use which protocol for broadcast ? is this UDP ?

yacovm
2016-11-16 06:40
no, we use gRPC

ankitkamra
2016-11-16 07:12
@yacovm Thanks :slightly_smiling_face:

ankitkamra
2016-11-16 07:28
Hi all, How to do access or role management in fabric?


adelcasse
2016-11-16 11:41
has joined #fabric

syyama
2016-11-17 07:27
has joined #fabric

piyo
2016-11-17 08:33
has joined #fabric

sukhoi
2016-11-17 12:18
now,I git clone fabric again,and there's no membersrvc,

pd93
2016-11-17 12:34
@sukhoi the master branch is a work in progress for v1. You need to checkout the v0.6 branch if you're working with membersrvc still. `git checkout v0.6` should do it

sukhoi
2016-11-17 12:38
Thank U

sukhoi
2016-11-17 12:39
@pd93 how to issues CA?

streich
2016-11-17 19:28
has joined #fabric

oleksbor
2016-11-17 20:36
has joined #fabric

bealdh
2016-11-17 21:54
has joined #fabric

stylix
2016-11-18 01:35
Regarding to a query timeout. Our current chaincode is really heavy, and we need to do a lot of thing during query. The question is, whenever the query take too long, probably more than 30 secs. we always got the segmentation fault, and crash the validator node. Any suggestion on this? Note: we currently use 0.6 branch.

ghaskins
2016-11-18 02:59
crashing the node is a bug regardless, so please file a jira

bealdh
2016-11-18 03:47
hi I am new here. Anyone have a suggestion for how I could contribute to the project?


bealdh
2016-11-18 03:56
would you recommend that I take a look around and try to identify something to contribute to?

ankitkamra
2016-11-18 03:59
In this link you will find out everything like how to setup dev environment, how to submit pull request to gerrit, coding standards etc it is self explanatory. you might check the given link.

bealdh
2016-11-18 04:00
yeah ok I set up everything and understand the coding standards. I just do not understand what help is needed specifically or where I would be useful

ankitkamra
2016-11-18 04:03
Create a linux foundation id and sign in on https://jira.hyperledger.org/secure/Dashboard.jspa checkout the existing issues and which issue is not assigned to anyone yet, comment on issue to request to assign issue to you. Then fix that issue and submit your pull request to gerrit

bealdh
2016-11-18 04:03
ah, thank you

stylix
2016-11-18 06:44
Thanks @ghaskins I will create an issue there soon.

stylix
2016-11-18 06:56
I have some other questions, 1. Is it possible to getState() concurrently? is there any lock? Can I actually getState in parallel? 2. For every single chaincode, we will get its chainhash once deployment. However, in the case that we need to modify the chaincode, we will have a different hash. The question is that, how can we retain those states from the old chaincode to the new one. Is it possible to do?

ankitkamra
2016-11-18 07:05

bealdh
2016-11-18 07:18
@ankitkamra very helpful, thanks

ypqu
2016-11-18 08:30
has joined #fabric

cbf
2016-11-18 11:57
@sukhoi I would strongly recommend that you not build from source but rather simply use the published docker images for v0.6.1 specifically the fabric starter kit http://hyperledger-fabric.readthedocs.io/en/v0.6/#fabric-starter-kit

zemtsov
2016-11-18 12:07
@cbf what if I need to start fabric peer on non-x86 machine? Is there such image or I must to build it by myself?

garisingh
2016-11-18 12:15
@zemtsov - which architecture are you trying to build for?

zemtsov
2016-11-18 12:15
power8

zemtsov
2016-11-18 12:16
I saw the instruction how to do this, but haven’t followed it yet

garisingh
2016-11-18 12:17
we were not YET able to add the Docker images for Power and Z to the hyperledger build, but we (IBM) do build Docker images: https://hub.docker.com/u/ibmblockchain/

garisingh
2016-11-18 12:17
you'll see tags for both the fabric-peer and fabric-membersrvc for Power8

garisingh
2016-11-18 12:17
ppc64le-0.6.1-preview

zemtsov
2016-11-18 12:17
Wow! That’s great! Thank you!

garisingh
2016-11-18 12:26
sure thing

kaustubhoak
2016-11-18 13:35
Does anybody know how to resolve following error?

kaustubhoak
2016-11-18 13:35
Error when querying chaincode: Error:Failed to launch chaincode spec(Could not get deployment transaction for mycc - LedgerError - ResourceNotFound: ledger: resource not found)

kaustubhoak
2016-11-18 13:36
I have deployed a chain code. I get above error when I query for the ledger state

oleksbor
2016-11-18 13:43
Hi @kaustubhoak, Can you tell your request and how chaincode was registered?

kaustubhoak
2016-11-18 13:44
Enroll/Registrar....

kaustubhoak
2016-11-18 13:44
https://3c464117baca47e6a8ed67c783868a17-vp0.us.blockchain.ibm.com:5001/registrar { "enrollId": "test_user6", "enrollSecret": "b7pmSxzKNFiw" }

kaustubhoak
2016-11-18 13:44
Deploy http://192.168.99.100:7050/chaincode { "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID": { "name": "mycc", "path": "https://github.com/kaustubhibm/learn-chaincode/tree/v1.0/start" }, "ctorMsg": { "function": "init", "args": [ "hi there" ] }, "secureContext": "test_user6" }, "id": 1 }

kaustubhoak
2016-11-18 13:45
Invoke (write) http://192.168.99.100:7050/chaincode { "jsonrpc": "2.0", "method": "invoke", "params": { "type": 1, "chaincodeID": { "name": "mycc" }, "ctorMsg": { "function": "write", "args": [ "hello_world", "go away" ] }, "secureContext": "test_user6" }, "id": 3 }

kaustubhoak
2016-11-18 13:45
Query http://192.168.99.100:7050/chaincode { "jsonrpc": "2.0", "method": "query", "params": { "type": 1, "chaincodeID": { "name": "mycc" }, "ctorMsg": { "function": "read", "args": [ "hello_world" ] }, "secureContext": "test_user6" }, "id": 2 }

kaustubhoak
2016-11-18 13:47
I am trying to experiment with chaincode using Docker image of fabric on local machine

oleksbor
2016-11-18 14:08
I faced with same error.

oleksbor
2016-11-18 15:03
In docker logs I see error 14:57:11.364 [chaincode] Launch -> ERRO 9ab sending init failed(handler not found for chaincode mycc)

kaustubhoak
2016-11-18 15:16
@oleksbor No resolution found yet?

muralisr
2016-11-18 15:32
@oleksbor ^^^ is on 0.6 ?

zemtsov
2016-11-18 15:57
@garisingh I have started Power images successfully. Thanks again!

garisingh
2016-11-18 16:19
great news! glad to hear it

vdods
2016-11-18 23:38
Can anyone comment on if any of the SDKs (e.g. fabric-sdk-node, fabric-sdk-py, etc) are reasonably complete, enough to successfully run a user-authenticated end-to-end test? I'm trying to figure out the most reasonable path to running user-authenticated chaincode on a peer network.

nvlasov
2016-11-19 01:53
has joined #fabric

garisingh
2016-11-19 09:17
@vdods - not exactly sure what you are trying to do? I'd say that if you wish to use V1 (the code in master) then the answer is probably not quite yet (but might be good to start). With v0.6.1, the answer is yes (but note that the node-sdk is actually in the fabric repo in v0.6.x)

5erj
2016-11-19 13:54
@muralisr RE: https://hyperledgerproject.slack.com/files/muralisr/F31SUN4P3/simple_test_with_skeletal_peer.md Thanks for your help last time. Indeed, the instructions at http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Chaincode-setup worked for `v0.6` and they don't work for the latest from `master`


5erj
2016-11-19 13:54
_(which I assume has architectural/design changes)_

vdods
2016-11-19 19:29
@garisingh Thanks!

kaustubhoak
2016-11-20 03:36
Does anyone know how to overcome following error?

kaustubhoak
2016-11-20 03:36
Error when deploying chaincode: Error getting chaincode package bytes: Error getting code 'go get' failed with error

kaustubhoak
2016-11-20 03:37
I get this when I try to deploy custom or example chain code on IBM Bluemix hyperledger instance

kaustubhoak
2016-11-20 04:18
well, it's a happy sunday since I could resolve all the issues I was facing while deploying the "learn chaincode" to IBM Bluemix....

kaustubhoak
2016-11-20 04:18
Big lessons learnt....

kaustubhoak
2016-11-20 04:20

kaustubhoak
2016-11-20 04:21
looks like the chaincode deployment from a branch other than "master" of relevant github repo does not work

kaustubhoak
2016-11-20 04:23
2. "chaincodeID": {"name": "mycc"..... does not work and has to be "chaincodeID": {"name": "<CHAIN CODE ID from the response of an earlier chain code deployment invocation>"

sowmya
2016-11-20 12:24
has joined #fabric


muralisr
2016-11-20 15:06
@satyam_agl lets continue the conversation here

satyam_agl
2016-11-20 15:06
has joined #fabric

muralisr
2016-11-20 15:07
@satyam_agl are you on 0.6 or master fabric level ?

satyam_agl
2016-11-20 15:08
it is 0.6

muralisr
2016-11-20 15:10
ok

muralisr
2016-11-20 15:11
how are you starting the peer ?

satyam_agl
2016-11-20 15:14
i am new in this, i don't know how to start the peer , i only run the command docker-compose up and performs the set of instruction given in the hyperledger fabric documentation at the final step i stuck to make the registered the chaincode

muralisr
2016-11-20 15:15
ok

muralisr
2016-11-20 15:16
after you do `docker-compose up`

muralisr
2016-11-20 15:16
can you do `docker ps`

muralisr
2016-11-20 15:16
and paste it here

satyam_agl
2016-11-20 15:16
yes i also do docker ps

muralisr
2016-11-20 15:16
ok

satyam_agl
2016-11-20 15:17
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES a10bc744494a hyperledger/fabric-peer "sh -c 'sleep 5; peer" 21 hours ago Up 13 minutes 0.0.0.0:7050-7051->7050-7051/tcp, 0.0.0.0:7053->7053/tcp satyam_vp0_1 7dc96e9d7bb6 hyperledger/fabric-membersrvc "membersrvc" 21 hours ago Up 13 minutes 0.0.0.0:7054->7054/tcp satyam_membersrvc_1

muralisr
2016-11-20 15:17
`docker inspect a10bc744494a`

satyam_agl
2016-11-20 15:18
it gives me some type of json data

satyam_agl
2016-11-20 15:18
do i paste the same

muralisr
2016-11-20 15:18
before that

muralisr
2016-11-20 15:18
lets try CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:7050 ./chaincode_example02

satyam_agl
2016-11-20 15:19
it gives me same error as previous

muralisr
2016-11-20 15:19
ok

muralisr
2016-11-20 15:19
can you do two things

muralisr
2016-11-20 15:20
1) paste `sh -c 'sleep 5; peer… ` line from docker-compose.yml

muralisr
2016-11-20 15:20
actually, attach docker-compose.yml here

muralisr
2016-11-20 15:20
2) attach the json data from inspect

satyam_agl
2016-11-20 15:21
okay

satyam_agl
2016-11-20 15:21

satyam_agl
2016-11-20 15:24

satyam_agl
2016-11-20 15:33
then what next ?

muralisr
2016-11-20 15:54
oh sorry.. I was distracted by something else .. `CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=172.17.0.3:7051 ./chaincode_example02`

satyam_agl
2016-11-20 15:59
no problem

satyam_agl
2016-11-20 15:59
$ CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=172.17.0.3:7051 ./chaincode_example02 21:28:42.851 [shim] INFO : Chaincode log level not provided; defaulting to: DEBUG 21:28:42.851 [shim] DEBU : Peer address: 172.17.0.3:7051 21:28:46.011 [shim] ERRO : Error trying to connect to local peer: grpc: timed out when dialing Error starting Simple chaincode: Error trying to connect to local peer: grpc: timed out when dialing

muralisr
2016-11-20 16:00
`netstat -an | grep LISTEN`

satyam_agl
2016-11-20 16:02
it does not contain 172.17.0.3:7051

satyam_agl
2016-11-20 16:02
or any 0.0.0.0:7501 , 7503

muralisr
2016-11-20 16:04
it doesn’t contain any 70XX ?

satyam_agl
2016-11-20 16:04
nope

muralisr
2016-11-20 16:05
can you do `docker ps` again please ?

satyam_agl
2016-11-20 16:05
okay

satyam_agl
2016-11-20 16:06
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES a10bc744494a hyperledger/fabric-peer "sh -c 'sleep 5; peer" 22 hours ago Up About an hour 0.0.0.0:7050-7051->7050-7051/tcp, 0.0.0.0:7053->7053/tcp satyam_vp0_1 7dc96e9d7bb6 hyperledger/fabric-membersrvc "membersrvc" 22 hours ago Up About an hour 0.0.0.0:7054->7054/tcp satyam_membersrvc_1

satyam_agl
2016-11-20 16:42
???

satyam_agl
2016-11-20 16:43
@muralisr i am waiting for your answer pls help me to solve this issue

muralisr
2016-11-20 16:49
@satyam_agl can you do `docker logs a10bc744494a` ?

muralisr
2016-11-20 16:51
followed by `docker info`

satyam_agl
2016-11-20 18:35
i do what i have to give u from this

satyam_agl
2016-11-20 18:38
$ docker info Containers: 2 Running: 2 Paused: 0 Stopped: 0 Images: 2 Server Version: 1.12.3 Storage Driver: aufs Root Dir: /mnt/sda1/var/lib/docker/aufs Backing Filesystem: extfs Dirs: 31 Dirperm1 Supported: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: host null bridge overlay Kernel Version: 4.4.27-boot2docker Operating System: Boot2Docker 1.12.3 (TCL 7.2); HEAD : 7fc7575 - Thu Oct 27 17:23:17 UTC 2016 OSType: linux Architecture: x86_64 CPUs: 1 Total Memory: 995.8 MiB Name: default ID: HMCB:FGK7:EJZR:Q2PA:E6XQ:2PJC:UZ2F:BVJD:LCNR:GFIK:4DUU:KI4D Docker Root Dir: /mnt/sda1/var/lib/docker Debug mode (client): false Debug mode (server): true File Descriptors: 24 Goroutines: 49 System Time: 2016-11-20T18:35:12.5355764Z EventsListeners: 1 Registry: https://index.docker.io/v1/ Labels: provider=virtualbox

zhihong
2016-11-21 03:32
has joined #fabric

matpasha
2016-11-21 06:40
Hi , We are running fabric in prod mode which requires the git repo path at the time of chaincode deployment. Currently we are unable to deploy the code from a private git repo. Is there a way around this? Could anybody please help on this issue? Thanks

bfuentes
2016-11-21 09:35
Hi all, I can't see in the documentation if MULTI SIGNATURE is available and how to use it. Does anyone know ?

niubwang
2016-11-21 10:59
hi gus, does anynoe konw the TPS of the fabric? the current version and the version 1.0

manh.nguyen
2016-11-21 15:10
has joined #fabric

mike_wall
2016-11-21 17:13
Hello! I'm running fabric through CLI with `docker run`. I created instance of class where I run one peer, and sending and getting messages. The question is: why when I'm getting messages from root peer I got every message I invoke through all peers, but when I'm getting messages from not root peer, I am getting only those messages, that I invoke to this peer. Info on blockchain should be kept on all peers, isn't it?

jamesjong
2016-11-21 19:25
has joined #fabric

aloha-rick
2016-11-21 19:45
has joined #fabric

jkilpatr
2016-11-21 20:53
@matpasha clone over ssh with keys?

kevinmarks
2016-11-21 23:10
has joined #fabric

synblockchainteam
2016-11-22 09:30
has joined #fabric

lipets
2016-11-22 09:48
has joined #fabric

lipets
2016-11-22 09:49
Hello, I'm running this SDK-node example https://github.com/hyperledger/fabric-sdk-node/blob/master/docs/sample-standalone-app.md. In this example the chaincode deployed,invoked and queried from node.js applicaiton Actually, it works only once. Next time, when I restart the peer and membersrv the admin user is rejected. I found some kind of "work around" by changing admin to admin1,2,3,4... in membersrv.yaml file, but it not always works. So how to register an admin for second time?

bfuentes
2016-11-22 10:56
*** ANNOUNCEMENT *** I will give a 3H workshop on Hyperledger Fabric on March 21 -23 at DEVOXX US - San Diego You are welcome to join and participate to the event :smile: Feel free to send me what you would like to see and play with (@benji_fuentes) . The agenda is not fixed for the moment *** END ***

jjmiranda
2016-11-22 14:01
How is the core.yaml configuration for a Non Validating Peer connecting to a HTTPs/gRPCs Validating Peer/Memberdhip, can anyone help me with this?

lipets
2016-11-22 16:08
The latest fabric in github does not contain "membersrv". Why? Where can I get it? (I need it for sdk-node and sdk-java samples)

garisingh
2016-11-22 16:11
@lipets - why not just use the Docker images we publish already?

garisingh
2016-11-22 16:11
other option is to checkout that v0.6 branch rather than master

garisingh
2016-11-22 16:12
master is where v1.0 work is taking place and membership services is replaced by fabric-cop which has its own repo

garisingh
2016-11-22 16:12
the SDK samples you are looking at are likely for v0.6 in any case

lipets
2016-11-22 16:14
@garisingh, thank you. Where it is published? I'm using vagrant. Is 0.6 compatible with 0.7+membersrv that I already have?

garisingh
2016-11-22 16:17
hmm - I'll be honest - I'm not familiar with v0.7 - but I'll say the answer is yes if it is still using membersrvc

garisingh
2016-11-22 16:18

lipets
2016-11-22 19:48
@garisingh, thank you. I started docker using instructions from here https://github.com/hyperledger/fabric/blob/master/docs/Setup/Chaincode-setup.md (Running the Peer and CA). It runs, but it seems that there is no response at all on port 7054

cbf
2016-11-22 19:53
@lipets you should play with the starter-kit here… should be no need to build from source


lipets
2016-11-22 20:06
@cbf, thank you, It works! Also i was able to install branch v0.6 with vagrant and start node test application. What I can't - is running fabric-sdk-java samples...

cbf
2016-11-22 20:58
@lipets I am not sure which commit level is matched with the v0.6 release - you should ask on the #fabric-sdk-java channel

nits7sid
2016-11-23 03:56
What is the maximum limit for  the consenters?

squeue
2016-11-23 05:38
has joined #fabric

sachinsurvase
2016-11-23 06:59
has joined #fabric

mike_wall
2016-11-23 11:34
Why when I'm query, it gives me this `Failed to launch chaincode spec(Could not get deployment transaction for ce511e1a5fd60c1fffb6d32bb8a47f7af61f0a6fafb2cd4111a0a0f8034879ff - LedgerError - ResourceNotFound: ledger: resource not found)`? I'm using PBFT consensus and running 4 peers. Deploying and invoking performed correctly.

bfuentes
2016-11-23 12:17
sometimes, needs to wait few seconds

bfuentes
2016-11-23 12:37
@mike_wall otherwise , have a look on the peer logs. 99% sure you have a problem with your chaincode build

bercinho
2016-11-23 13:37
has joined #fabric

bercinho
2016-11-23 13:37
Dear Gents, does anyone know how to configure the docker-compose.yaml to have a Starter (starter1: container_name: starter1 image: hyperledger/fabric-starter-kit) stating up my chaincode? But I need this for 4 peers, and not only 1. Does this mean I need 4 starters?

bercinho
2016-11-23 13:39
I want to have vp0, vp1, vp2, vp3 all running on the same node, with PBFT consensus and having the starter(s) to kick off the chaincode in each of them.

bercinho
2016-11-23 13:39
Many Thanks

tuand
2016-11-23 14:06
@bercinho, in the hyperledger/fabric/bddtests directory, there are docker-compose yml files that start up 1 to 4 peers. You can use these as examples for what you need to do

bercinho
2016-11-23 14:55
Hi

bercinho
2016-11-23 14:55
Thanks for the info. But these don´t use the starters

bercinho
2016-11-23 14:55
this part

bercinho
2016-11-23 14:55
starter1: container_name: starter1 image: hyperledger/fabric-starter-kit volumes: # tweak this to map a local developmnt directory tree into the container - /opt/gopath/src/github.com:/opt/gopath/src/github.com environment: - MEMBERSRVC_ADDRESS=membersrvc:7054 - PEER_ADDRESS=vp0:7051 - KEY_VALUE_STORE=/tmp/hl_sdk_node_key_value_store # set to following to 'dev' if peer running in Developer mode - DEPLOY_MODE=dev - CORE_CHAINCODE_ID_NAME=myfirstcc - CORE_PEER_ADDRESS=vp0:7051 # the following command will start the chain code when this container starts and ready it for deployment by the app command: sh -c "sleep 20; /opt/gopath/src/github.com/myfirstcc/myfirstcc" stdin_open: true tty: true links: - membersrvc - vp0

bercinho
2016-11-23 14:56
so I want to understand how to use this (to kick off the chaincode) with multiple peers

bercinho
2016-11-23 14:56
whether I need one starter per peer or just one starter and how to configure

tuand
2016-11-23 15:17
@bercinho you'll want to tweak hyperledger/fabric/examples/sdk/node/docker-compose.yml to add the peers ( use the hyperledger/fabric/bddtests files to see how the peers are configured). You don't need to edit the starter service definition

bercinho
2016-11-23 15:24
Hi, thanks for response! :slightly_smiling_face: so the starter service will work to deploy the chaincode to all the peers? Do I have to extend the "links" of he starter service to vp0, vp1, vp2, vp3 as well?

bercinho
2016-11-23 15:28
@bercinho uploaded a file: https://hyperledgerproject.slack.com/files/bercinho/F371CFL6B/docker-compose2.yaml and commented: This is my current config, which doesn´t work.

tuand
2016-11-23 15:36
The peer you send a request to will propagate to the other peers so all peers will execute ... the peers do need to link with each other and membersrvc so they should have docker links to discovery_root_node and membersrvc

tuand
2016-11-23 15:36
the starter should have docker links to whichever peer it is sending requests to

bercinho
2016-11-23 15:38
ah ok, cool so the starter only have a link to one peer?

tuand
2016-11-23 15:38
i don't know if your core_vm_endpoint is needed ... otherwise, you'll have to read logs to see why the transaction is not executing

tuand
2016-11-23 15:39
yes, link to vp0 is enough

bercinho
2016-11-23 15:39
ok thanks, I will play around a bit and let you know :slightly_smiling_face:

tuand
2016-11-23 15:40
i'll be disappearing soon ( thanksgiving holiday travel ) but this is the right channel . We'll see if other folks see this conversation

bercinho
2016-11-23 15:41
ok cool, thanks :slightly_smiling_face: have a good holiday! :slightly_smiling_face:

alanlee
2016-11-23 16:55
has joined #fabric

ankitkamra
2016-11-24 03:16
A general question: Does Non validating peer contains Chaincode and shared ledger both ?

hajabuza
2016-11-24 07:49
has joined #fabric

grapebaba
2016-11-24 08:37
guys, I found an issue about TLS. Actually the tlsca.cert under bddtests directory is expired. The only valid cert is the one in fabric-membersrvc image under /var/hyperledger/production/.membersrvc

jonathanlevi
2016-11-24 09:33
Yup, we wanted to update this but then it got deprioritized somehow. See https://jira.hyperledger.org/browse/FAB-213

jonathanlevi
2016-11-24 09:33
Validity `Not Before: Jan 21 22:49:51 2016 GMT` `Not After : Apr 20 22:49:51 2016 GMT`

jonathanlevi
2016-11-24 09:34
Moving this to #membership-services

jonathanlevi
2016-11-24 09:34
Or maybe #fabric-cop ...

yacovm
2016-11-24 09:38
I thought we don't have bdd tests for V1

yacovm
2016-11-24 09:38
no point in prioritizing it now

jonathanlevi
2016-11-24 09:43
Usually the problem is not the test… (BDD or otherwise). We should have both positive-flow and negative-flow tests, verifying the correct functionality in case(s) of expired certs. Definitely in fabric-cop. I don’t have a strong opinion at this point about how we really write these tests.

yacovm
2016-11-24 09:47
bdd doesn't work now, at all.

jonathanlevi
2016-11-24 09:56
The fact that the BDD tests are not working “at all” cannot be a good enough reason for not fixing them :wink:

jonathanlevi
2016-11-24 09:56
I say: if we have it, it should work.

jonathanlevi
2016-11-24 09:56
If it should not work/not expected to work - it should not be there.

jonathanlevi
2016-11-24 09:57
There is some work needed both in fabric-cop / membership services and in any component validating these certs.

jonathanlevi
2016-11-24 09:57
A matter of priority, but I don’t think it should be ignored.

shubhamvrkr
2016-11-24 12:20
What is the maximum transactions rate the system can handle?

satyam_agl
2016-11-24 13:42
how to add two or more peers on the same machine , is i have to change in the docker-compse.yml file if yes then what are these changes ? please anybody can help

kindus
2016-11-24 22:02
has joined #fabric

free
2016-11-25 03:38
has joined #fabric

kaavya
2016-11-25 05:59
how to connect peers from two different system

vigneswaran.r
2016-11-25 06:04

vigneswaran.r
2016-11-25 06:06
@kaavya Do you want to connect peers through CLI method or REST APIs?

kaavya
2016-11-25 06:08
CLI

ankitkamra
2016-11-25 06:11
@kaavya while starting node use switch -CORE_PEER_DISCOVERY_ROOTNODE=<Path to first node>

kaavya
2016-11-25 06:14
In a same system we will give path as docker ip address. I have to configure physical ip address of two system, so that they can discover root nodes. How can I configure this.. Is there any steps to follow?

ankitkamra
2016-11-25 06:14
are you using vagrant or docker ??

kaavya
2016-11-25 06:18
Inside vagrant env we use docker commands to run peers..

kaavya
2016-11-25 06:18
docker run --rm -it -e CORE_VM_ENDPOINT=http://172.17.0.1:2375 -e CORE_LOGGING_LEVEL=DEBUG -e CORE_PEER_ID=vp1 -e CORE_PEER_ADDRESSAUTODETECT=true -e CORE_PEER_DISCOVERY_ROOTNODE=172.17.0.2:7051 hyperledger/fabric-peer peer node start

ankitkamra
2016-11-25 06:19
Okay got it you have to do port forwarding in vagrantfile that exist in devenv directory

vigneswaran.r
2016-11-25 06:20
I think, port forwarding is done by default in vagrant.

kaavya
2016-11-25 06:21
Yes... Its already done

kaavya
2016-11-25 06:21
config.vm.network :forwarded_port, guest: 7050, host: 7050 # Openchain REST services config.vm.network :forwarded_port, guest: 7051, host: 7051 # Openchain gRPC services config.vm.network :forwarded_port, guest: 7054, host: 7054 # Membership service config.vm.network :forwarded_port, guest: 7053, host: 7053 # GRPCCient gRPC services

vigneswaran.r
2016-11-25 06:21
Then you can replace CORE_PEER_DISCOVERY_ROOTNODE=172.17.0.2:7051 with CORE_PEER_DISCOVERY_ROOTNODE=<other_machine_ip>:7051

vigneswaran.r
2016-11-25 06:22
You can specify the other machine (where another peer is running)'s IP (instead of 172.17.0.2

vigneswaran.r
2016-11-25 06:23
I mean the physical machine's IP..

ankitkamra
2016-11-25 06:23
@kaavya Actually you have done port forwarding from host --> guest and there is no port forwarding from guest --> docker

ankitkamra
2016-11-25 06:24
hence it will be able to connect host --> guest --> docker

kaavya
2016-11-25 06:25
how can I do port mapping from guest --> docker ?

ankitkamra
2016-11-25 06:26
use docker-compose

vigneswaran.r
2016-11-25 06:27

vigneswaran.r
2016-11-25 06:27
eg., vp0: image: hyperledger/fabric-peer ports: - "7050:7050" - "7051:7051" - "7053:7053"

ankitkamra
2016-11-25 06:28
@kaavya yes you may refer to example given by @vigneswaran.r

kaavya
2016-11-25 06:36
guess in this example using docker compose we are trying to run multiple peers using same docker-compose.yaml file ?

vigneswaran.r
2016-11-25 06:41
true.. but that's an example only. please see the "ports:" part which is used for forwarding the ports. ignore the rest.

vigneswaran.r
2016-11-25 06:43
the docker-compose.yaml in the specific example is meant for running one membership service (membersrvc) and one peer (vp0).

kaavya
2016-11-25 06:47
@vigneswaran.r thank you

kaavya
2016-11-25 06:47
I'll try these..

vigneswaran.r
2016-11-25 06:48
@kaavya welcome..

ankitkamra
2016-11-25 08:35
hy i am getting following error while deploying chaincode on fabric network:- vp1_1 | 12:12:57.682 [dockercontroller] deployImage -> ERRO 0b0 Error building images: dial unix /var/run/docker.sock: connect: no such file or directory vp1_1 | 12:12:57.682 [dockercontroller] deployImage -> ERRO 0b1 Image Output

vigneswaran.r
2016-11-25 08:55
I assume, you are running peer service inside docker image. Have you passed the environment variable CORE_VM_ENDPOINT=http://172.17.0.1:2375 while starting the peer?

vigneswaran.r
2016-11-25 08:57
In my understanding, peer will talk to Docker through CORE_VM_ENDPOINT in order to build docker image, communicate with running chaincode etc.

vigneswaran.r
2016-11-25 08:58
In your case it is trying to talk to docker using the unix socket (instead of through TCP/IP).

ankitkamra
2016-11-25 08:58
yeah i have given CORE_VM_ENDPOINT

ankitkamra
2016-11-25 08:59
i have tried both

vigneswaran.r
2016-11-25 08:59
ok..

sachinsurvase
2016-11-25 09:13
Can PEER maintain two different ledgers at the same time? e.g I want to keep two separate ledgers; one for PRIVATE transactions and another for public transactions visible to everyone participating

sachinsurvase
2016-11-25 09:14
PEER=VALIDATING NODE

sachinsurvase
2016-11-25 09:14
for simplicity

warm3snow
2016-11-25 09:49
I just git clone the latest fabric code. But when i execute 'make' command, I got an error: ``` LINT: Running code checks.. Checking ./core ./scripts/golinter.sh: line 11: goimports: command not found Makefile:124: recipe for target 'linter' failed make: *** [linter] Error 127 ``` The log says 'goimports is not found', but I have this command in my GOPATH/bin. ``` xxx@ubuntu:/home/opt/gopath/src/github.com/hyperledger/fabric$ which goimports /home/opt/gopath/bin/goimports ``` Can anyone help me fix this? or give me a clue.

bercinho
2016-11-25 16:37
Hello Gents, I get this problem when trying to startup Hyperledger on a Docker Overlay Network setup (adding the net:"networkname" into the Docker-Compose.yml):

bercinho
2016-11-25 16:37
vp2_1 | 15:53:04.624 [crypto] Errorf -> ERRO 021 [validator.test_vp2] Failed requesting read certificate [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp2_1 | 15:53:04.624 [crypto] Errorf -> ERRO 022 [validator.test_vp2] Failed requesting ECA certificate [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp2_1 | 15:53:04.624 [crypto] Errorf -> ERRO 023 [validator.test_vp2] Failed getting ECA certificate [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp2_1 | 15:53:04.624 [crypto] Errorf -> ERRO 024 [validator.test_vp2] Failed retrieving ECA certs chain [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp2_1 | 15:53:04.624 [crypto] Errorf -> ERRO 025 [validator.test_vp2] Failed registering node crypto engine [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp2_1 | 15:53:04.624 [crypto] Errorf -> ERRO 026 [validator.test_vp2] Failed registering peer [test_vp2]: [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure] vp2_1 | 15:53:04.624 [crypto] Errorf -> ERRO 027 [validator.test_vp2] Failed registering [test_vp2]: [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure] vp2_1 | 15:53:04.624 [crypto] RegisterValidator -> ERRO 028 Failed registering validator [test_vp2] with name [test_vp2] [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure].

bercinho
2016-11-25 16:38
anyone had some similar problem?

bercinho
2016-11-25 16:38
when I remove the net: "networkname" form the containers in the docker-compose.yml everything works

bercinho
2016-11-25 16:38
note I use etcd for the external key-store

bercinho
2016-11-25 16:39
./etcdctl cluster-health gives a positive result

bercinho
2016-11-25 16:59
I guess the peers are not able to connect to the membersrvc service in case every container is using the overlay network

bercinho
2016-11-25 16:59
but why?

thompsonshi
2016-11-26 07:40
has joined #fabric

sadanandu
2016-11-27 09:11
Hi, does anyone know why the REST api for chain code is being deprecated?

muralisr
2016-11-27 12:33
@sadanandu REST api is restricted so as the the fabric can be minimal and all access can be controlled via SDKs and other higher layers

jassengu
2016-11-28 01:40
has joined #fabric

sadanandu
2016-11-28 03:20
@muralisr can you plz elaborate on the restrictions in REST api? I am getting a feeling that my app has limited functionality so the HFC is bit overkill for my app. I just want to be convinced before I go this HFC way


nikileshsa
2016-11-28 03:49
I am trying to follow the fabric skeletal workflow for deploying and invoking chaincode..

nikileshsa
2016-11-28 03:50
i am running this peer inside a docker container..

nikileshsa
2016-11-28 03:51
not sure if I am missing something..

muralisr
2016-11-28 03:54
@sadanandu I should have worded it more carefully …. `REST api is removed (not “restricted”) so as the the fabric can be minimal and all access can be controlled via SDKs and other higher layers`

vigneswaran.r
2016-11-28 03:56
@bercinho Sometimes this error comes if we start the peer immediately after starting the membership service. Please give ~15 sec before starting the peer service (by the time the membership service will be ready). I assume, you are using the correct IP address of the membersrvc node and port number.

sadanandu
2016-11-28 04:01
@muralisr oh...Thanks for the reply...I think I got the point there ...leave fabric to do what is core to it and write API in other higher level abstractions elsewhere


ankitkamra
2016-11-28 06:09
hi i am facing following issue while registering golang example chaincode:- vp0_1 | 06:08:14.636 [chaincode] processStream -> ERRO 02b Error handling chaincode support stream: stream error: code = 1 desc = "context canceled"

ankitkamra
2016-11-28 06:10
any inputs ?

kletkeman
2016-11-28 06:38
There I was, happy and content that v0.6 was brought into line with v1 fabric so that we could bring our contracts into line with the future API. So I go to build against v1 for the first time and am stunned to find a new API break. And for a simple change to the signature for Init. Was that really necessary? My point being that we would like to avoid separate source copies for v0.6 (Bluemix) and v1 ... vagrant@hyperledger-devenv:v0.2.1-8ae8147:/local-dev/src/github.com/ibm-watson-iot/blockchain-samples/contracts/platform/iotcontractminimalsample$ go build # http://github.com/ibm-watson-iot/blockchain-samples/contracts/platform/iotcontractminimalsample ./main.go:41: cannot use new(SimpleChaincode) (type *SimpleChaincode) as type shim.Chaincode in argument to shim.Start: *SimpleChaincode does not implement shim.Chaincode (wrong type for Init method) have Init(shim.ChaincodeStubInterface, string, []string) ([]byte, error) want Init(shim.ChaincodeStubInterface) ([]byte, error) vagrant@hyperledger-devenv:v0.2.1-8ae8147:/local-dev/src/github.com/ibm-watson-iot/blockchain-samples/contracts/platform/iotcontractminimalsample$

aelmanaa
2016-11-28 06:57
has joined #fabric

sadanandu
2016-11-28 08:25
Hi, i am writing chain code application in Golang and want to create a web UI for it. I found out https://github.com/IBM-Blockchain/cp-web this example . Here they are using mycreds.json to fetch the information regarding peers, ca, users. This file can be auto generated if you are using IBM blue mix. Since I am developing on local development environment in the HyperLedger fabric , i can't get this file directly. Can someone please help me out and guide how to get around this? I want to use the HFC SDK and this credentials file is necessary for it.

madhavi
2016-11-28 09:56
hi, i am trying to deploy chaincode in peer as peer chaincode deploy -p http://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -n mycc -c '{"Args": ["init", "a","100", "b", "200"]}' -----I am getting error:

madhavi
2016-11-28 09:56
09:55:36.019 [msp] func1 -> INFO 001 Creating the msp manager 09:55:36.019 [msp] GetManager -> INFO 002 Returning MSP manager %!p(msp.peerMspManagerImpl={map[] false}) 09:55:36.020 [msp] Setup -> INFO 003 Setting up the MSP manager from config file /opt/gopath/src/github.com/hyperledger/fabric/msp/peer-config.json 09:55:36.020 [msp] newBccspMsp -> INFO 004 Creating BCCSP-based MSP instance 09:55:36.021 [SW_BCCSP] createKeyStoreIfNotExists -> INFO 005 KeyStore path [/tmp] missing [false]: [<clean>] 09:55:36.022 [msp] Setup -> INFO 006 Setting up MSP DEFAULT 09:55:36.022 [msp] Setup -> INFO 007 Setting up MSP instance from file /opt/gopath/src/github.com/hyperledger/fabric/msp/peer-config.json 09:55:36.055 [msp] newIdentity -> INFO 008 Creating identity instance for ID &{{DEFAULT} ROOTCA} 09:55:36.055 [msp] newSigningIdentity -> INFO 009 Creating signing identity instance for ID &{{DEFAULT} PEER} 09:55:36.055 [msp] Setup -> INFO 00a MSP manager setup complete (config file /opt/gopath/src/github.com/hyperledger/fabric/msp/peer-config.json) Error: Error endorsing chaincode: rpc error: code = 12 desc = unknown service protos.Endorser

ankitkamra
2016-11-28 10:18
hy all i am facing following error:-vp0_1 | 09:55:22.752 [dockercontroller] deployImage -> ERRO 01d Error building images: dial unix /var/run/docker.sock: connect: no such file or directory vp0_1 | 09:55:22.753 [dockercontroller] deployImage -> ERRO 01e Image Output: vp0_1 | ******************** vp0_1 | vp0_1 | ******************** vp0_1 | 09:55:22.757 [dockercontroller] Start -> ERRO 01f start-could not recreate container Post http://unix.sock/containers/create?name=dev-vp0-ee5b24a1f17c356dd5f6e37307922e39ddba12e5d2e203ed93401d7d05eb0dd194fb9070549c5dc31eb63f4e654dbd5a1d86cbb30c48e3ab1812590cd0f78539: dial unix /var/run/docker.sock: connect: no such file or directory vp0_1 | 09:55:22.757 [chaincode] Launch -> ERRO 020 launchAndWaitForRegister failed Error starting container: Post http://unix.sock/containers/create?name=dev-vp0-ee5b24a1f17c356dd5f6e37307922e39ddba12e5d2e203ed93401d7d05eb0dd194fb9070549c5dc31eb63f4e654dbd5a1d86cbb30c48e3ab1812590cd0f78539: dial unix /var/run/docker.sock: connect: no such file or directory

vigneswaran.r
2016-11-28 10:38
@ankitkamra I hope, you have found the docker configuration file in Centos. Does it contain any entry like the following, DOCKER_OPTS="-s=aufs -r=true --api-cors-header='*' -H -H unix:///var/run/docker.sock "

vigneswaran.r
2016-11-28 10:38
this essentially says docker to listen on both TCP/IP port 2375 and unix socket /var/run/docker.sock

ankitkamra
2016-11-28 10:45
yes problem is that docker is not listening

ankitkamra
2016-11-28 10:46
i did not find any file with the given entry

ankitkamra
2016-11-28 10:46
let me try

vigneswaran.r
2016-11-28 10:50
ok

vigneswaran.r
2016-11-28 10:55
In centos, the configuration file seems to be /etc/sysconfig/docker

ankitkamra
2016-11-28 10:55
@vigneswaran.r i found the file

ankitkamra
2016-11-28 10:55
and edit deployed chaincode

ankitkamra
2016-11-28 10:55
but again same problem

ankitkamra
2016-11-28 10:55
but this time its listening on 172.17.0.1 2375

ankitkamra
2016-11-28 10:55
i am able to telnet from host machine but not able to telnet from docker images

vigneswaran.r
2016-11-28 10:56
can you copy paste the DOCKER_OPTS in your docker file?

vigneswaran.r
2016-11-28 10:56
we can see if some typo etc..

ankitkamra
2016-11-28 10:57
i have edit docker.service file

ankitkamra
2016-11-28 10:57
as following

ankitkamra
2016-11-28 10:57
ExecStart=/usr/bin/dockerd -H -H unix:///var/run/docker.sock

ankitkamra
2016-11-28 10:58
i found this somewhere

ankitkamra
2016-11-28 10:58
because there is no such configuration file under /etc/

vigneswaran.r
2016-11-28 11:00
ok.. can you see whether this is what actually running? (ps ax|grep dockerd) This should show you the command being run

ankitkamra
2016-11-28 11:00
yes i have checked it

ankitkamra
2016-11-28 11:00
even its listening on 2375 port

vigneswaran.r
2016-11-28 11:03
try whether docker is listening on /var/run/docker.sock also.. (sudo fuser -v /var/run/docker.sock)

ankitkamra
2016-11-28 11:06
hmm let me check

ankitkamra
2016-11-28 11:08
same problem :disappointed:

vigneswaran.r
2016-11-28 11:08
what is the output of the fuser command?

garisingh
2016-11-28 11:09
@ankitkamra - are you running the peers as Docker containers as well?

ankitkamra
2016-11-28 11:11
@vigneswaran.r can you please specify exact command for fuser ?

vigneswaran.r
2016-11-28 11:12
sudo fuser -v /var/run/docker.sock

ankitkamra
2016-11-28 11:12
@garisingh yes i am running both

ankitkamra
2016-11-28 11:12
@vigneswaran.r [root@localhost ~]# sudo fuser -v /var/run/docker.sock Cannot stat /var/run/docker.sock: No such file or directory Cannot stat /var/run/docker.sock: No such file or directory

vigneswaran.r
2016-11-28 11:13
can you give the output of "ps ax|grep dockerd"

vigneswaran.r
2016-11-28 11:14
I suspect, the docker is not starting with proper options.

ankitkamra
2016-11-28 11:14
[root@localhost ~]# ps ax|grep dockerd 779 pts/0 S+ 0:00 grep dockerd

vigneswaran.r
2016-11-28 11:14
no docker is running??

ankitkamra
2016-11-28 11:14
sorry wait

ankitkamra
2016-11-28 11:14
i got output from wrong terminal

vigneswaran.r
2016-11-28 11:14
ok

ankitkamra
2016-11-28 11:15
[root@localhost ~]# ps ax|grep dockerd 9168 ? Ssl 0:00 /usr/bin/dockerd -H -H unix:///var/run/docker.sock 9480 pts/2 S+ 0:00 grep --color=auto dockerd

ankitkamra
2016-11-28 11:15
this is the output

ankitkamra
2016-11-28 11:15
and following is output of fuser command:- [root@localhost ~]# sudo fuser -v /var/run/docker.sock USER PID ACCESS COMMAND /run/docker.sock: root 9168 F.... dockerd

vigneswaran.r
2016-11-28 11:15
ok..

vigneswaran.r
2016-11-28 11:16
so, it seems docker is actually listening to /var/run/docker.sock properly..

ankitkamra
2016-11-28 11:16
yes

ankitkamra
2016-11-28 11:17
but not able to telnet to specific port

ankitkamra
2016-11-28 11:17
i dont know why

vigneswaran.r
2016-11-28 11:17
wait

vigneswaran.r
2016-11-28 11:18
change the docker command to /usr/bin/dockerd -H -H unix:///var/run/docker.sock

vigneswaran.r
2016-11-28 11:18
don't put the IP, instead use 0.0.0.0

ankitkamra
2016-11-28 11:18
i had tried this also

ankitkamra
2016-11-28 11:18
even tried with 127.0.0.1

vigneswaran.r
2016-11-28 11:18
please try with 0.0.0.0 once again and try to telnet

ankitkamra
2016-11-28 11:19
okay sure

ankitkamra
2016-11-28 11:20
able to telnet from localhost

ankitkamra
2016-11-28 11:21
not from other machine

ankitkamra
2016-11-28 11:21
its giving following error:- vp0_1 | 11:21:11.858 [dockercontroller] deployImage -> ERRO 020 Error building images: cannot connect to Docker endpoint

vigneswaran.r
2016-11-28 11:21
do you have any default firewall running?

ankitkamra
2016-11-28 11:21
no

ankitkamra
2016-11-28 11:21
firewall is off

vigneswaran.r
2016-11-28 11:22
can you check "iptables -L -n -v"

vigneswaran.r
2016-11-28 11:22
sudo iptables -L -n -v

vigneswaran.r
2016-11-28 11:22
on the machine where docker is running...

ankitkamra
2016-11-28 11:24

ankitkamra
2016-11-28 11:24
please find output for the same

vigneswaran.r
2016-11-28 11:27
try flushing the INPUT chain.. sudo iptables -F INPUT

vigneswaran.r
2016-11-28 11:28
an then try the telnet

ankitkamra
2016-11-28 11:28
yes now able to telnet

vigneswaran.r
2016-11-28 11:28
ok..

jackkleeman
2016-11-28 11:31
in v7 I am getting "transport: http2Server.HandleStreams failed to receive the preface from client: EOF" followed by what looks to be a peer crash every 4-6 hours. any ideas?

yacovm
2016-11-28 11:32
v7?

ankitkamra
2016-11-28 11:32
@vigneswaran.r chaincode deployed but now getting following error:- vp0_1 | 11:30:12.360 [dockercontroller] deployImage -> ERRO 020 Error building images: Tag latest not found in repository http://docker.io/hyperledger/fabric-baseimage vp0_1 | 11:30:12.360 [dockercontroller] deployImage -> ERRO 021 Image Output: vp0_1 | ******************** vp0_1 | Step 1 : FROM hyperledger/fabric-baseimage vp0_1 | Pulling repository http://docker.io/hyperledger/fabric-baseimage vp0_1 | vp0_1 | ********************

yacovm
2016-11-28 11:33
are you a time traveler?

ankitkamra
2016-11-28 11:33
@vigneswaran.r while querying chaincode getting following error:- vp0_1 | 11:32:11.493 [devops] invokeOrQuery -> INFO 040 Transaction ID: 23220388-c78b-42ed-ae45-655aed057c5c vp0_1 | 11:32:11.493 [rest] processChaincodeInvokeOrQuery -> ERRO 041 Error when querying chaincode: Error:Failed to launch chaincode spec(Could not get deployment transaction for 04233c6dd8364b9f0749882eb6d1b50992b942aa0a664182946f411ab46802a88574932ccd75f8c75e780036e363d52dd56ccadc2bfde95709fc39148d76f050 - LedgerError - ResourceNotFound: ledger: resource not found)

jackkleeman
2016-11-28 11:34
okay maybe its v6 then :slightly_smiling_face:

vigneswaran.r
2016-11-28 11:40
@ankitkamra I think, there is some problem with fabric-baseimage tag (latest) specified in the core.yaml (chaincode section).. May be it should be something like "$(ARCH)-$(PROJECT_VERSION)" instead of "latest".. not sure.. Due to that, the chaincode didn't get deployed, and the query fails.

jackkleeman
2016-11-28 11:40

ankitkamra
2016-11-28 11:41
oh @vigneswaran.r so what is you suggestion to resolve the problem ?

vigneswaran.r
2016-11-28 11:45
May be, you can edit the core.yaml (of the peer inside docker image) and look for the tag "latest". Try to change it as per my previous message. However, I am not very sure about this.

vigneswaran.r
2016-11-28 11:45
Let us wait for some expert's help..

ankitkamra
2016-11-28 11:47
@vigneswaran.r okay thanks

vigneswaran.r
2016-11-28 11:49
welcome..

stevenroose
2016-11-28 15:33
Is there a place where we can follow the development status of Fabric?

stevenroose
2016-11-28 15:34
Like a microblog or changelog summary, ...?

tbltzk
2016-11-28 15:34
has joined #fabric

ghaskins
2016-11-28 16:27
so is there someone looking at this spate of gossip/* UT failures?

ghaskins
2016-11-28 16:27
@yacovm don't mean to pick on you, but you are the only contact point I know for gossip

ghaskins
2016-11-28 16:27

yacovm
2016-11-28 16:27
which test is it this time

ghaskins
2016-11-28 16:27
gossip/comm in this case

ghaskins
2016-11-28 16:27
though I saw some gossip/state earlier too

yacovm
2016-11-28 16:28
wow

yacovm
2016-11-28 16:28
well, ``` 13:48:31 unit-tests_1 | --- FAIL: TestParallelSend (0.01s) 13:48:31 unit-tests_1 | panic: listen tcp :5611: bind: address already in use [recovered] 13:48:31 unit-tests_1 | panic: listen tcp :5611: bind: address already in use ``` Is indeed mine but how is it possible? I use different ports in all the test

ghaskins
2016-11-28 16:29
theres a reasonable chance I need to rebase my patches if there were any recent fixes

yacovm
2016-11-28 16:29
are you running this locally?

yacovm
2016-11-28 16:29
oh right

yacovm
2016-11-28 16:29
no

ghaskins
2016-11-28 16:29
no, this was jenkins

yacovm
2016-11-28 16:29
that's in CI

yacovm
2016-11-28 16:30
yeah yeah it's the time

yacovm
2016-11-28 16:30
I think somehow that port is taken by some other port

yacovm
2016-11-28 16:30
this address already in use is impossible... I use different ports in each test in that file

ghaskins
2016-11-28 16:31
question: why not let the tcp stack pick one for you?

ghaskins
2016-11-28 16:31
ephemeral ports, i mean

yacovm
2016-11-28 16:32
because it's "hard"- how do I know which ports are open and which are not?

yacovm
2016-11-28 16:32
you mean why not bind to 0?

ghaskins
2016-11-28 16:32
right

yacovm
2016-11-28 16:32
heh, it works the other way

yacovm
2016-11-28 16:32
I get the port I need to bind to, from the gossip layer

yacovm
2016-11-28 16:32
the comm layer is underneath the gossip layer

muralisr
2016-11-28 16:32
(as an aside - @ghaskins .. when you say “spate” of failures. … do all have the same issue ? )

muralisr
2016-11-28 16:33
reason I ask is… if so something would be funky given @yakov's `Is indeed mine but how is it possible? I use different ports in all the test`

ghaskins
2016-11-28 16:33
@muralisr I just saw rumblings on the other channels with postings about the cobertura reports...which turned out to be a red herring...when I looked at the root cause of the cobertura error, it was a UT failure in gossip/*

yacovm
2016-11-28 16:33
I have a question- just to make sure: if I have in the same package- A_test.go and B_test.go

yacovm
2016-11-28 16:34
do they run serially?

yacovm
2016-11-28 16:34
well, @ghaskins that was a failure in gossip/state, not mine :wink:

ghaskins
2016-11-28 16:34
@yacovm its not clear

yacovm
2016-11-28 16:34
and Corwin said he'll take a look at it

ghaskins
2016-11-28 16:34
go does support parallel execution of tests, but when/where/if are varialbes

yacovm
2016-11-28 16:35
if it's not clear it's weird because the comm test never failed on *that* and that code has been there for weeks

yacovm
2016-11-28 16:35
I think the binding is a fluke... if it persists I'll try to investigate

ghaskins
2016-11-28 16:35
@ry has mentioned some unusual circumstances when a CI minion can be shared somehow

yacovm
2016-11-28 16:35
yeah, that's a big problem

yacovm
2016-11-28 16:35
for my code

ghaskins
2016-11-28 16:36
perhaps a test was running concurrently @ry ?

yacovm
2016-11-28 16:36
I remember that

yacovm
2016-11-28 16:36
But we need to take into consideration the probability of the tests to run *concurrently*

yacovm
2016-11-28 16:36
for example- if that minion runs the chaincode and the gossip at the same time, it's ok, etc. etc.

ry
2016-11-28 16:37
There should never be concurrent runs

ry
2016-11-28 16:38
What I said is there may be serial runs on one minion

ghaskins
2016-11-28 16:38
ah, right...it was a problem with persistent state

ry
2016-11-28 16:38
The only way I can imagine this happening is if a test hangs and another starts before a recycle

ghaskins
2016-11-28 16:38
I couldve sworn there was some problem with file locking from two things running or something too

ghaskins
2016-11-28 16:39
but maybe I am not remembering that correctly or had misunderstood

ry
2016-11-28 16:39
If a test crashes or something you might leave something locked

ghaskins
2016-11-28 16:39
ah, ok

ghaskins
2016-11-28 16:39
that couldve been it

yacovm
2016-11-28 16:40
ahhh

yacovm
2016-11-28 16:40
really?

yacovm
2016-11-28 16:40
wait how is that possible?

yacovm
2016-11-28 16:40
if a test crashes the process terminates

ghaskins
2016-11-28 16:48
if the underlying environment were reused...

ghaskins
2016-11-28 16:48
as opposed to starting fresh

yacovm
2016-11-28 16:54
but when the test fails the process dies and the port binding dies with it

jackkleeman
2016-11-28 17:42
will I run into any problems having an autorestarting systemd service which runs the peer, runs the chaincode, and sends a deploy command?

jackkleeman
2016-11-28 17:45
does anyone have any scripts that they use to handle the full deploy process?

ghaskins
2016-11-28 18:25
@jackkleeman what do you mean by "runs the chaincode"? it sounds like you are using a --devmode model?

ghaskins
2016-11-28 18:25
in a production environment, the peer would manage the lifecycle of the chaincode

jackkleeman
2016-11-28 18:26
yes devmode model

ghaskins
2016-11-28 18:26
fwiw, I do have a supervisord script that runs a v0.6 setup in --devmode with chaincode

jackkleeman
2016-11-28 18:26
this is because I dont want to keep track of the chaincode id

ghaskins
2016-11-28 18:26
but this is not a natural thing to do

jackkleeman
2016-11-28 18:26
could you send that my way?

ghaskins
2016-11-28 18:27
sure, hold on

ghaskins
2016-11-28 22:04

ghaskins
2016-11-28 22:04
I assume that is different from gossip/state or gossip/comms

yacovm
2016-11-28 22:13
Yep, it's the pull test that failed. I'll take a look tomorrow and see if I can figure out why that happened. It's kinda hard though, even from having stack traces of all goroutines there

yacovm
2016-11-28 22:13
never seen it fail in CI before however

yacovm
2016-11-28 22:20
This is weird though, it "sounds" like a block went missing, which doesn't make sense because the msgStore size is way higher than the amount of blocks I send in the test. The pull algorithm is supposed to have more than enough time to complete the blocks :confused:

ghaskins
2016-11-28 22:36
@nickgaski ping

nickgaski
2016-11-28 22:45
@vigneswaran.r @ankitkamra - the concepts surrounding hyperledger/fabric-baseimage are being supplanted by hyperledger/fabric-ccenv. As such, try pointing to this ccenv image in your docker-compose .yaml. Another option is to manually pull the baseimage for your platform and then execute a rename to tag it as baseimage:latest

nickgaski
2016-11-28 22:45
This documentation will be updated shortly, but we can work around it in the meantime

nickgaski
2016-11-28 22:48
for example, ```docker tag hyperledger/fabric-baseimage:x-86x86_64-0.2.1 hyperledger/fabric-baseimage:latest```

rixon
2016-11-29 02:45
has joined #fabric

ankitkamra
2016-11-29 03:15
@nickgaski Thank you :slightly_smiling_face: , i have one question that where is fabric-baseimage is running, according to documentation we need to pull only fabric-membersrvc and fabric-peer image. And i have already tagged it with latest.

ghaskins
2016-11-29 03:49
@ankitkamra baseimage is used, as the name implies, as the baseimage of most docker images in the system...in v0.6 it is also used directly to compile chaincode

ghaskins
2016-11-29 03:50
in v1.0/master, there is a new image named "ccenv" which takes its place as the environment that we compile chaincode into

ghaskins
2016-11-29 03:50
but the concept is the same, just the name changes

ghaskins
2016-11-29 03:50
the main problem you are seeing is the system is still not yet really equiped to run from anything but from a locally build source environment

ghaskins
2016-11-29 03:51
yes, you can run from docker with a little massaging, but its still not turnkey

ghaskins
2016-11-29 03:51
we are working on that

ankitkamra
2016-11-29 03:52
@ghaskins so should i pull fabric-baseimage too ?

ankitkamra
2016-11-29 03:53
and fabric-baseimage is used by peer only or as well it must exist on membersrvc machine too ?

vigneswaran.r
2016-11-29 03:53
once see what are all the images you have.. (docker images)

vigneswaran.r
2016-11-29 03:53
it may be just a matter of tagging properly

ankitkamra
2016-11-29 03:53
i have two machines, one contains membersrvc image and another contain peer image

ghaskins
2016-11-29 03:54
@ankitkamra yes, for v0.6.1-preview, you want to pull hyperledger/fabric-baseimage:$(arch)-0.0.11

ghaskins
2016-11-29 03:54
and retag it as latest

ghaskins
2016-11-29 03:55
it does not need to exist on the membersrvc node

ghaskins
2016-11-29 03:55
just the peer

ghaskins
2016-11-29 03:56
actually, i think v0.6 only supports x86_64 now that I think of it

ankitkamra
2016-11-29 03:56
okay let me try

ankitkamra
2016-11-29 03:57
@ghaskins and @vigneswaran.r Thanks a lot, i am trying with provided solution, if i face any problem i will get back to you guys

ghaskins
2016-11-29 03:58
@ankitkamra pay attention to the version....v0.6.1-preview uses v0.0.11...the latest is v0.2.1

ghaskins
2016-11-29 03:58
but dont be tempted to use the latest

ghaskins
2016-11-29 03:58
that is not qualified to work together

ankitkamra
2016-11-29 03:59
okay thanks

ghaskins
2016-11-29 03:59
np, and good luck

ankitkamra
2016-11-29 04:36
@ghaskins and @vigneswaran.r i have pulled hyperledger/fabric-baseimage:hyperledger/fabric-baseimage and tagged it with hyperledger/fabric-baseimage:latest but now i am facing following issue:-

ankitkamra
2016-11-29 04:37
@ankitkamra uploaded a file: https://hyperledgerproject.slack.com/files/ankitkamra/F38NJ32MC/-.txt and commented: Any inputs ?

ghaskins
2016-11-29 04:37
I've never seen that before

ankitkamra
2016-11-29 04:38
ohh

vigneswaran.r
2016-11-29 04:38
Me too :disappointed:

vigneswaran.r
2016-11-29 04:39
Try a quick search on google which may give some hint..

ankitkamra
2016-11-29 04:39
@ankitkamra uploaded a file: https://hyperledgerproject.slack.com/files/ankitkamra/F382PBSRY/-.txt and commented: Full error details are here

ankitkamra
2016-11-29 04:39
yeah doing that too

madhavi
2016-11-29 04:55
Hi, I deploy a chaincode in peer, I am getting error as: Error: Error endorsing chaincode: rpc error: code = 12 desc = unknown service protos.Endorser

madhavi
2016-11-29 04:55
how to solve this?

ankitkamra
2016-11-29 05:55
@ghaskins and @vigneswaran.r its working with baseimage version x86_64-0.2.1 Thanks a lot for your support guys

vigneswaran.r
2016-11-29 05:56
How did you resolve your last error "Cannot normalise nothing"?

vigneswaran.r
2016-11-29 05:56
@ankitkamra That information will be helpful for others..

ankitkamra
2016-11-29 06:12
@vigneswaran.r i was using baseimage v0.0.11. I think that was not compatible with peer v0.6.1-preview. I just pulled out another versions and it is working fine with baseimage v0.2.1

vigneswaran.r
2016-11-29 06:14
@ankitkamra Thanks for the information..

smiley
2016-11-29 06:35
has joined #fabric

smiley
2016-11-29 06:37
Hi, I start peer as peer node start, I got an error as below

smiley
2016-11-29 06:37

smiley
2016-11-29 06:37
please help me out

ankitkamra
2016-11-29 06:42
@smiley what you are trying to do ? I mean running single peer or two peers from different host

smiley
2016-11-29 06:43
@ankitkamra two peers with different host

ankitkamra
2016-11-29 06:44
so your root peer is running properly??

ankitkamra
2016-11-29 06:44
try to do ping and telnet from another host

ankitkamra
2016-11-29 06:44
and firewall must be off on both machines

smiley
2016-11-29 06:54
yes root peer is running properly and able to ping and telnet

smiley
2016-11-29 06:54
firewall is off only in both machines

ankitkamra
2016-11-29 06:57
@smiley run following command:- iptables -F on both peers

ankitkamra
2016-11-29 06:59
and can you please post your docker-compose files ?

smiley
2016-11-29 07:00
k

smiley
2016-11-29 07:03

ankitkamra
2016-11-29 07:09
please run following command on both peers:- docker images and post the output

ankitkamra
2016-11-29 07:09
are your using vagrant ?

smiley
2016-11-29 07:17
yes vagrant

ankitkamra
2016-11-29 07:27
so have you done port forwarding in Vagrantfile ?

smiley
2016-11-29 07:44
yes

smiley
2016-11-29 07:44
now peers got connected its working fine

smiley
2016-11-29 07:44
@ankitkamra thanq

ankitkamra
2016-11-29 08:16
np.. welcome

gkourtellos
2016-11-29 12:20
has joined #fabric

anton
2016-11-29 12:28
has joined #fabric

dc
2016-11-29 16:00
has joined #fabric

jchenibm
2016-11-30 01:59
added an integration to this channel: https://hyperledgerproject.slack.com/services/B38FKLQBD

jchenibm
2016-11-30 02:01
removed an integration from this channel: https://hyperledgerproject.slack.com/services/B38FKLQBD

cypherzealot
2016-11-30 04:28
has joined #fabric

lovesh
2016-11-30 06:43
has joined #fabric

chadgates
2016-11-30 09:56
has joined #fabric

ankitkamra
2016-11-30 11:04
Hi i am trying to setup non validating peer, I have just changed in peer/core.yaml and changed validator=false i am facing following issue:- nvp0_1 | 10:57:57.945 [peer] handleChat -> ERRO 012 Error handling message: Peer FSM failed while handling message (DISC_HELLO): current state: created, error: transition canceled with error: Error registering Handler: Duplicate Handler error: {name:"nvp0" 172.17.0.2:7051 NON_VALIDATOR can anyone help me to resolve the issue ?

albrandt
2016-11-30 18:19
has joined #fabric

ankitkamra
2016-12-01 05:22
Hey all, i have deployed chaincode on vp and invoking it from nvp, ideally it must forward my invoke request to root node i.e. validating peer. But it is not requesting to vp

ankitkamra
2016-12-01 05:23
i am getting following error:-

ankitkamra
2016-12-01 05:23

akashsethi24
2016-12-01 05:46
has joined #fabric

vigneswaran.r
2016-12-01 05:51
@ankitkamra If you run membersrvc docker image, 172.17.0.2 will be taken by that; First peer will have 172.17.0.3. So, by any chance you mentioned wrong peer IP somewhere?

ankitkamra
2016-12-01 05:52
@vigneswaran.r both docker images are on separate machines so both have the same ip 172.17.0.2

akashsethi24
2016-12-01 05:53
@akashsethi24 has left the channel

vigneswaran.r
2016-12-01 05:54
oh.. ok

ankitkamra
2016-12-01 05:57
@vigneswaran.r so whats your suggestion ? What can be the possible solution ?

vigneswaran.r
2016-12-01 05:58
so both validating and non-validating peers on the same machine, right?

ankitkamra
2016-12-01 06:02
no both are on separate machines

vigneswaran.r
2016-12-01 06:03
then NVP can't reach VP0 by 172.17.0.2 IP right? it should be reached using the machine's IP, isn't it?

vigneswaran.r
2016-12-01 06:04
172.17.0.0 is local to a machine (docker network) right?

vigneswaran.r
2016-12-01 06:06
I think, you are already using membersrvc machine's IP (not the 172.17.0.2) to reach the service from peer on another machine..

vigneswaran.r
2016-12-01 06:06
Similar is the case with NVP to VP (when they run on different machines).

ankitkamra
2016-12-01 06:10
yes nvp can't reach to vp0 by 172.17.0.2

ankitkamra
2016-12-01 06:11
my network is as following:- membersrvc:- 172.30.65.39 vp0:- 172.30.65.36

ankitkamra
2016-12-01 06:11
nvp0:- 172.30.65.26

ankitkamra
2016-12-01 06:12
and i have give vp0 address as root node address in docker-compose file of nvp

ankitkamra
2016-12-01 06:12
vp0 machine physical ip address

vigneswaran.r
2016-12-01 06:13
since your error message shows 172.17.0.2:7051, I am a bit confused.. From where that information is taken?

ankitkamra
2016-12-01 06:14
both vp and nvp auto detected these address using docker to make communication over grpc

vigneswaran.r
2016-12-01 06:14
oh, ok..

ankitkamra
2016-12-01 06:14
basically both must listen on physical ip

ankitkamra
2016-12-01 06:15
i have changed configurations in peer/core.yaml but it can't assign physical address

vigneswaran.r
2016-12-01 06:15
May be then, we should disable the auto detection of IP..

ankitkamra
2016-12-01 06:15
hmm let me check

ankitkamra
2016-12-01 06:17
i have checked peer/core.yaml in which addressAutoDetect is already false under peer section

vigneswaran.r
2016-12-01 06:17
CORE_PEER_ADDRESSAUTODETECT=true

vigneswaran.r
2016-12-01 06:18
But you may have the above line in your docker-compose.yaml

vigneswaran.r
2016-12-01 06:18
If so, you can comment that

ankitkamra
2016-12-01 06:19
oh yes, i forgot docker-compose file :smile:

vigneswaran.r
2016-12-01 06:20
:slightly_smiling_face:

ankitkamra
2016-12-01 06:20
after commenting it, its still auto detecting ip address

ankitkamra
2016-12-01 06:20
see the logs:- vp0_1 | 11:54:55.984 [peer] func1 -> INFO 001 Auto detected peer address: 172.17.0.2:7051 vp0_1 | 11:54:55.984 [peer] func1 -> INFO 002 Auto detected peer address: 172.17.0.2:7051 vp0_1 | 2016/12/01 11:54:55 Failed to listen: listen tcp 172.17.0.3:7051: bind: cannot assign requested address ankit_vp0_1 exited with code 1

vigneswaran.r
2016-12-01 06:22
hmm..

ankitkamra
2016-12-01 06:22
and yes it can't listen on given ip address as no adapter is listening on given address in container:-

ankitkamra
2016-12-01 06:22
root@10ce6e1b5ede:/opt/gopath/src/github.com/hyperledger/fabric# ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 356: eth0@if357: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff inet 172.17.0.2/16 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::42:acff:fe11:2/64 scope link valid_lft forever preferred_lft forever

ankitkamra
2016-12-01 06:22
see the output of container

vigneswaran.r
2016-12-01 06:24
ok.. I think, listening on local IP is fine.. docker will take care of forwarding the port to the host..

vigneswaran.r
2016-12-01 06:25
however, I am not sure how NVP identifies the validating peer's IP.. whether Peer says it? If so, it will tell the 172.17.0.2 IP only (not the machine's IP)..

ankitkamra
2016-12-01 06:26
yes, it is telling ip 172.17.0.2

ankitkamra
2016-12-01 06:26
that both broadcasting through gRPC

vigneswaran.r
2016-12-01 06:27
ok.. Interesting problem.. I am not sure how to resolve.. Let's see anyone else has any information on that..

ankitkamra
2016-12-01 06:27
yeah

ankitkamra
2016-12-01 06:28
meanwhile i am trying to setup static ip for docker images

vigneswaran.r
2016-12-01 06:33
ok

ankitkamra
2016-12-01 06:51
@vigneswaran.r can you please tell, when we use docker-compose up, where it runs docker run command ?

kaavya
2016-12-01 07:01
I have a problem with peers...

kaavya
2016-12-01 07:03
I can deploy a chain code through root peer.. It gets deployed. But transaction is not added to the blockchain.

kaavya
2016-12-01 07:04
and the other is, validating peers are not able to deploy the chain code.

kaavya
2016-12-01 07:04
Can some one help??

vigneswaran.r
2016-12-01 07:16
@ankitkamra I am not getting your question.. Docker-compose will run the docker command in the current machine.. Is that what you're asking for or something else?

vigneswaran.r
2016-12-01 07:21
@kaavya If you provide some more information, like your peer log, people may be able to help..

ranjan008
2016-12-01 07:34
I am trying to run a docker peer using a docker compose file and I am getting this error 'vp0_1 | 07:30:05.593 [crypto] RegisterValidator -> INFO 006 Registering validator [test_vp0] with name [test_vp0]... vp0_1 | 07:30:05.603 [crypto] Errorf -> ERRO 007 [validator.test_vp0] Failed requesting read certificate [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp0_1 | 07:30:05.603 [crypto] Errorf -> ERRO 008 [validator.test_vp0] Failed requesting ECA certificate [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp0_1 | 2016/12/01 07:30:05 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp: lookup membersrvc on 10.0.2.3:53: no such host"; Reconnecting to {"membersrvc:7054" <nil>} vp0_1 | 2016/12/01 07:30:05 Failed to dial membersrvc:7054: grpc: the connection is closing; please retry. vp0_1 | 07:30:05.603 [crypto] Errorf -> ERRO 009 [validator.test_vp0] Failed getting ECA certificate [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp0_1 | 07:30:05.603 [crypto] Errorf -> ERRO 00a [validator.test_vp0] Failed retrieving ECA certs chain [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp0_1 | 07:30:05.604 [crypto] Errorf -> ERRO 00b [validator.test_vp0] Failed registering node crypto engine [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp0_1 | 07:30:05.605 [crypto] Errorf -> ERRO 00c [validator.test_vp0] Failed registering peer [test_vp0]: [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure] vp0_1 | 07:30:05.605 [crypto] Errorf -> ERRO 00d [validator.test_vp0] Failed registering [test_vp0]: [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure] vp0_1 | 07:30:05.606 [crypto] RegisterValidator -> ERRO 00e Failed registering validator [test_vp0] with name [test_vp0] [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. '

kaavya
2016-12-01 07:34

kaavya
2016-12-01 07:46
@vigneswaran.r , Snippet added above is for root peer

kaavya
2016-12-01 07:47
Its getting deployed but transactions are not getting added to the block

kaavya
2016-12-01 07:47
Block height is 1 : {"height":1,"currentBlockHash":"RrndKwuojRMjOz/rdD7rJD/NUupiuBuCtQwnZG7Vdi/XXcTd2MDyAMsFAZ1ntZL2/IIcSUeatIZAKS6ss7fEvg=="}

vigneswaran.r
2016-12-01 07:49
Try to add an entry as shown below, in your /etc/hosts file to resolv membersrvc host. 172.17.0.2 membersrvc

kaavya
2016-12-01 07:50
ok

ankitkamra
2016-12-01 08:30
Hi all, i am getting following error:- vp0_1 | 14:05:19.194 [peer] ensureConnected -> WARN 018 Touch service indicates dropped connections, attempting to reconnect...

ankitkamra
2016-12-01 08:30
can anyone tell me what can be the possible solution

ankitkamra
2016-12-01 08:30
?

ranjan008
2016-12-01 09:03
@ankitkamra i think its not an error your node might have been connected to some peers which might be down now so it is trying to reconnect with those peers

ankitkamra
2016-12-01 09:04
@ranjan008 okay let me check

tprafull
2016-12-01 09:58
has joined #fabric

ephan
2016-12-01 14:35
has joined #fabric

amarpreet
2016-12-01 14:45
has joined #fabric

bercinho
2016-12-01 15:42
Gents, I receive this error message while trying to deploy chaincode from Node.js (HFC SDK):

bercinho
2016-12-01 15:42
Debugger listening on [::]:5858 **** starting HFC sample **** member services address =10.43.185.247:7054 peer address =10.43.185.247:7051 DEPLOY_MODE=dev enrolling user admin ... deploying chaincode; please wait ... Enrolled berci successfully Failed to deploy chaincode: request={"chaincodeName":"chaincode_example02","fcn":"init","args":["a","100","b","200"],"chaincodePath":"http://github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02"}, error=%k EventTransactionError { error: { status: 'FAILURE', msg: <Buffer 43 65 72 74 69 66 69 63 61 74 65 20 68 61 73 20 6e 6f 74 20 62 65 65 6e 20 73 69 67 6e 65 64 20 62 79 20 61 20 74 72 75 73 74 65 64 20 61 75 74 68 6f ... > }, msg: 'Certificate has not been signed by a trusted authority. [x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "eca")]' } Connection attempt 1 to node process on 127.0.0.1:5858 failed. Will try again in 500.

bercinho
2016-12-01 15:42
Is there anyone who could help me with this?

garisingh
2016-12-01 16:14
@bercinho - you might want to post this over in one of the fabric-sdk-node channels, but a quick guess would be that perhaps the certificates being used by your peer are different than the ones received by the Node client. This might have happened in you've wiped out / restarted membership services, the peer and the client all at different times. Are you running the peer(s) and membersrvc via Docker?

bercinho
2016-12-01 16:17
hi, thanks for feedback. Peer & Membersrvc is running via Docker indeed ... the thing is I am able to interact correctly from my local workstation via the REST APIs (using Postman), but when running Node.JS SDK in Atom I get this problem

garisingh
2016-12-01 16:18
yeah - via REST the peer you connect to acts as the client so it would make sense that would work

garisingh
2016-12-01 16:19
what OS are you using?

bercinho
2016-12-01 16:19
Windows 7 locally

bercinho
2016-12-01 16:20
Dockers running in ec2 AWS cloud

bercinho
2016-12-01 16:20
Linux ip-10-43-185-247 4.4.23-31.54.amzn1.x86_64 #1 SMP Tue Oct 18 22:02:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

bercinho
2016-12-01 16:46
Log on the Peer side: vp0_1 | 16:45:11.509 [peer] ProcessTransaction -> ERRO 1de618 ProcessTransaction failed to verify transaction Certificate has not been signed by a trusted authority. [x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "eca")]


jdockter
2016-12-01 18:37
Here is a list that has been posted in the past, https://wiki.hyperledger.org/community/fabric-design-docs

shashankbk
2016-12-01 22:17
has joined #fabric

satyam_agl
2016-12-02 07:17
please anybody guide me what is the use of the Node SDK ,if a user can hit the chaincode api directly

satyam_agl
2016-12-02 07:21
how do i make a dynamic entry in the memmbersrvc.yml for certificates of the user

gvlax
2016-12-02 10:08
has joined #fabric

ceobco
2016-12-02 11:22
has joined #fabric

angelito
2016-12-02 15:39
has joined #fabric

webkruncher
2016-12-02 16:14
has joined #fabric

webkruncher
2016-12-02 16:16
I'm trying to get two computers networked so I can add chaincode on one, and query from the other. I see that it's easy to do with two different nodes on the same computer, but I haven't been able to get to machines networked right. I'm using CORE_PEER_DISCOVERY_ROOTNODE to specify the other computer in my docker-compose.yml. I used a simple python server to make sure that the machines can talk on ports 705x, but I still get errors: [peer] chatWithPeer -> ERRO 056 Ending Chat with peer address 10.101.3.140:7053 due to error: Error creating handler during handleChat initiation: Error creating PeerHandler: Error creating new Peer Handler, error returned sending DISC_HELLO: Error Sending message through ChatStream: rpc error: code = 13 desc = transport is closing. Any suggestions?

ghaskins
2016-12-02 16:18
@webkruncher it sounds like you are using docker-compose but manually running two different compositions?

ghaskins
2016-12-02 16:18
or are you using something like swarm to spread one composition across two nodes?

webkruncher
2016-12-02 16:20
@ghaskins - I'm using docker-compose - nothing manual - what do you mean 'two different compositions'?

garisingh
2016-12-02 16:22
@webkruncher - Docker native on each host or trying to run Docker in Vagrant on two different hosts or 2 Vagrant / Docker on the same host?

webkruncher
2016-12-02 16:22
@ghaskins no swarm - nothing special

webkruncher
2016-12-02 16:22
Two vagrant / docker on different hosts

garisingh
2016-12-02 16:22
hmm - that might be the issue. You'd be better of trying Docker native on two hosts

ghaskins
2016-12-02 16:22
@webkruncher what I meant was: running "docker-compose up" from two different hosts

garisingh
2016-12-02 16:23
Well - let me start with what is your host OS?

ghaskins
2016-12-02 16:23
and I agree with @garisingh: too many layers of indirection are probably messing up the network routes

webkruncher
2016-12-02 16:23
Ubuntu 14

webkruncher
2016-12-02 16:23
Ok, sounds like I need to use docker outside of vagrant??

webkruncher
2016-12-02 16:24
I'll give it a shot

ghaskins
2016-12-02 16:24
you certainly can, that would collapse one level of networking

webkruncher
2016-12-02 16:24
k - thx

ghaskins
2016-12-02 16:24
the most straightforward way would be to use something like swarm so you can let docker take care of the SDN overlay

ghaskins
2016-12-02 16:24
but thats up to you

lesterpig
2016-12-03 17:06
has joined #fabric

steven.landers
2016-12-04 01:34
has joined #fabric

duncanjw
2016-12-04 13:08
@webkruncher hi might be worth talking to @mikezaccardo who has simplified deployment of HLF across any number of machines local and wide area

name63
2016-12-04 18:31
has joined #fabric

name63
2016-12-04 18:39
The chaincode is starting without any errors

donjohnny
2016-12-04 21:51
has joined #fabric

mikezaccardo
2016-12-05 02:36
@webkruncher i can definitely talk to you about the work i’ve done to streamline HLF deployment if you’re interested

nits7sid
2016-12-05 04:37
The Query interface is been omitted in the current fabric code. So now query functions will also be logged into the blockchain as transactions?

muralisr
2016-12-05 05:02
@nits7sid since (1) everything is a proposal from client to the peer (to the endorser to be more specific) and (2) proposals are not written to the ledger at the time of endorsement, there is no need to make the distinction between a query and an invoke. The response returned by the proposal will contain the return value (that query used to return) from the chaincode. It is upto the application to determine what should be converted to a transaction to be committed to the ledger

nits7sid
2016-12-05 05:19
oh.. so does that mean if i have just have simple query function in a CC and if i have to make it a transaction then i would have to use PutState() inside the query function? How to determine what should be converted to transaction? Is it from CC level or the SDK will a interface for it?

rehmke
2016-12-05 15:30
has joined #fabric

sstone1
2016-12-05 15:56
has joined #fabric

binhn
2016-12-05 15:57
my deck presented to the community in NYC this morning is in https://jira.hyperledger.org/browse/FAB-37

rehmke
2016-12-05 15:58
@binh Thank you

greg_not_so
2016-12-05 15:58
@rehmke more action in general channel

oneil
2016-12-05 22:34
has joined #fabric

kongotania
2016-12-06 01:14
has joined #fabric

warm3snow
2016-12-06 08:09
Did anyone encounter the following problem ? I got this when i perform `make all` in fabirc ```"./scripts/golinter.sh: line 11: goimports: command not found Makefile:120:recipe for target linter' failed``` In my terminal, I run `which goimports`. It returns `/home/opt/gopath/bin/goimports`, that is to say, i have the 'goimports' command. Can anyone tell me the reason?

kansi
2016-12-06 09:45
has joined #fabric

pd93
2016-12-06 14:02
Can anyone enlighten me as to what this line of code does (in the context of a docker-compose file) and whether it's necessary. Spotted it in one of yeasy's compose files. ` - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=fabric_`

synblockchainteam
2016-12-06 14:43
This is regarding Hyperledger v0.6/ We are running "authorizable_counter" sample application over hyperledger v0.6. But we are encountering "Failed retrieving extension" error while testing Invoke api with postman... On digging the code, we noticed that "1.2.3.4.5.6.9" ObjectIdentifier is missing in certificate extension during x509.GetCriticalExtension() API execution. Did someone face similar issue? Thanks.

mgrand
2016-12-06 19:23
has joined #fabric

mgrand
2016-12-06 19:26
What is fabric's concurrency model? If two simultaneous transactions invoke the same chaincode, are they forced to run serially or are there locking semantics that would allow the two transactions to run concurrently?

tuand
2016-12-06 19:39
@mgrand, all transactions must be executed serially

mgrand
2016-12-06 19:40
Do you know of any plans to change that?

tuand
2016-12-06 19:44
no, but take a look at https://wiki.hyperledger.org/community/fabric-design-docs ... by breaking the peer into endorser/orderer/committer, applications can at least run the endorsement step in parallel

synblockchainteam
2016-12-07 08:02
I have setup Hyper ledger v 0.6. While executing "Invoke" method of sample application "authorizable_counter", we face this issue -- "Failed retrieving extension". Did someone face similar issue? if so, please provide us some clue. Thanks.

triptananda
2016-12-07 11:15
has joined #fabric

pd93
2016-12-07 11:33
I keep getting the following error when trying to do anything with security turned on. The user 'vp' is enrolled and logged in and has been given a key. `[open /var/hyperledger/production/crypto/client/vp/ks/raw/chain.key: no such file or directory]` Anyone know what's going on?

synblockchainteam
2016-12-07 12:48
Does anyone know, what is '1.2.3.4.5.6.9' entry in x509 Certificate Extension ?

ahmedelhajji
2016-12-07 12:57
has joined #fabric

ahmedelhajji
2016-12-07 12:57
Hi, I have an hyperledger project running on my VMs with a chaincode deployed on it. This chaincode updates the world state in its invoke method. Now I'd need to query a previous world state... Does anyone know if it can be achieved ?

stevenroose
2016-12-07 14:16
Is there a public roadmap or tracker to see advancements for Fabric v1.0?

rkr
2016-12-07 14:51
has joined #fabric

rkr
2016-12-07 14:55
membersrvc has been removed from latest make file( https://github.com/hyperledger/fabric/commit/db7a41fd3fe8dc111c5f4e533410934a0ae8760f) . Can some please point how do i go ahead setting up CA ?

garisingh
2016-12-07 15:03
@rkr - what are you trying to do? there are currently 2 version of Fabric in play - V1 which is the current master branch and V0.6 which is in the v0.6 branch (and we have also published docker images to dockerhub under the hyperledger organization). If your goal is to start learning chaincode, then for now I would recommend the v0.6 Docker images and following Option 2 or 3 from http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Chaincode-setup/ . If you want to be on the bleeding edge, things will unfortunately be little tricky with the current master branch (we should have things a bit smoother over the course of the next week or so)

rkr
2016-12-07 15:17
@garisingh Thanks . oh ok , rt now i am just trying out things . I will wait for v1 to be more stable . Is there any tentative release notes for v1 which I can refer to ?

mgrand
2016-12-07 15:24
I want to create a fabric application that tracks the provenance of some items. What is a good strategy for doing this? The strategy needs to be scalable, as there will be millions of new items each day, each changing hands a few times a day. I could generate a unique key for each item. Would that be good? If I generate a unique key for each item, I would want to compare the change across different world states. Is there a good way to do this?

plucena
2016-12-07 16:06
@plucena uploaded a file: https://hyperledgerproject.slack.com/files/plucena/F3BSRR0JG/screen_shot_2016-12-07_at_2.05.48_pm.png and commented: Hi. 1 - I've cloned master brach from http://github.com/hyperledger/fabric 2 - vagrant up 3 - vagrant ssh 4 cd /hyperledger 5 make Everything compiles. Most of unit tests passes. Everything looks ok. When I try to run a peer: peer node start --peer-chaincodedev I get the following error:

tylerkeen
2016-12-07 19:53
has joined #fabric

friz
2016-12-07 20:39
has joined #fabric

walker
2016-12-07 20:50
has joined #fabric

hanglin
2016-12-07 21:00
has joined #fabric

rixon
2016-12-08 01:04
HL v0.6 does not support tracing historical records of the items. In order to link all the modifications made to an item, you should implement the logic by your chaincode. The query syntax is limited too for many use cases.

vdods
2016-12-08 01:17
Hi all, in the v0.6 protocol spec, under https://github.com/vdods/fabric/blob/v0.6/docs/protocol-spec.md#433-replay-attack-resistance it mentions that it's possible to run fabric with TCerts for transactions (potentially with as few as one TCert per transaction), or with fixed ECerts for transactions. What are the relevant configuration options (in membersrvc, peer, and/or HFC) that are needed to choose between the two?

humblealex
2016-12-08 01:19
@synblockchainteam Have you defined attributes in the REST? 1.2.3.4.5.6.9 is the identifier for attributes in the Tcert extension

vinodsankar
2016-12-08 03:36
has joined #fabric

arulmurugan
2016-12-08 07:17
Hi All, I am very new to hyperledger and its terminologies.. I know that it is kind of decentralized database.. How do i model the entities in fabric/chaincode? A simple use case.. Create user and store user specific records.. Many thanks in advance.

luodanwg
2016-12-08 09:28
has joined #fabric

trueter
2016-12-08 11:09
has joined #fabric

bercinho
2016-12-08 12:39
Hi All, anyone knows where too lookup information regarding codechain integration? when I don´t want to push data into the blockchain worls state, but rather have chaincode acess data via external serices? (this especailly becomes complex with real time data, like Pricing) ... I am aware of Oracles by Ethereum (SW, HW) and Cryplets from Microsoft, but what is the de-facto standard for Hyperledger?

synblockchainteam
2016-12-08 12:57
Hi, Can anyone tell me the use of "TCertAttributesHeaders = asn1.ObjectIdentifier{1, 2, 3, 4, 5, 6, 9}" in the "http://github.com\hyperledger\fabric\core\crypto\attributes\attributes.go" file. Thanks

shinji
2016-12-08 13:30
has joined #fabric

shinji
2016-12-08 13:32
Hi @plucena I've got the same error, did you find a solution?

harrijk
2016-12-08 14:35
has anyone experienced problems working with JIRA today?

arnaud
2016-12-08 14:38
@bercinho I'm not aware of any standard for this

arnaud
2016-12-08 14:38
note that "Hyperledger" is ambiguous as we have several frameworks being developed under that name

arnaud
2016-12-08 14:40
@arulmurugan I suggest you start looking into the examples that are available as part of the distribution

arnaud
2016-12-08 14:41

arnaud
2016-12-08 14:42
you may also be interested in some of the examples IBM made available here: https://github.com/IBM-Blockchain

arnaud
2016-12-08 14:43
the marbles and car-lease demos are good references

rkr
2016-12-08 15:56
@shinji @plucena check this https://hyperledgerproject.slack.com/archives/fabric/p1481122985000095 . v0.6 option 2 worked for me .

vinodsankar
2016-12-08 16:35
Is there a maximum value for number of nodes supported by fabric 0.6

bfuentes
2016-12-08 16:46
@vinodsankar no, but if you need performance last test were ok until 10 nodes using PBFT

bfuentes
2016-12-08 16:46
now with the V1.0, the consensus will change, so we expect to have much more

vinodsankar
2016-12-08 16:47
@bfuentes .. Thank You

bfuentes
2016-12-08 16:47
today, transactions are quite fast compared to Bitcoin or Ethereum

bfuentes
2016-12-08 16:47
more peers, more mess

bfuentes
2016-12-08 16:49
in Bitcoin some miners participates to the consensus , not all peers

bfuentes
2016-12-08 16:49
in Hyperledger V1.0 we will have consenters

bfuentes
2016-12-08 16:50
is a split for the actual validators peers

tuand
2016-12-08 17:47
@bfuentes, the V1.0 terms should be endorser/orderer/committer ... and my usual plug for the design docs at https://wiki.hyperledger.org/community/fabric-design-docs

tetiana
2016-12-08 17:56
has joined #fabric

oliverledger
2016-12-08 21:14
has joined #fabric

johnreid
2016-12-09 00:19
has joined #fabric

bharath
2016-12-09 03:56
has joined #fabric

bfuentes
2016-12-09 09:15
@tuand yep, you have the right terms :slightly_smiling_face:

joee
2016-12-09 09:52
has joined #fabric

thojest
2016-12-09 10:59
has joined #fabric

thojest
2016-12-09 11:00
hello all together i have a question there are two images i need to pull from docker concerning fabric: what is membersrvc ? so what i mean is, the first image i understand, is for the peers, but what is the second for? hyperledger/fabric-peer:latest hyperledger/fabric-membersrvc:latest

joee
2016-12-09 12:30
I want to create multiple assets on Fabric, which I guess is straight forward. But I also want each and every "piece of the asset” to have a unique ID. Is there a better way of doing this than creating 100000 “pieces” of the asset and then sending transactions in batch? Seems like a slow solution where transfer of multiple “pieces” means sending 1 tx for every “pieces”. Would it be possible to do something like a multiTx, where transactions are batched together and signed once?

ramvi
2016-12-09 12:31
has joined #fabric

joee
2016-12-09 12:37
> Issue tracking is handled in Jira Can anyone see these issues?

bfuentes
2016-12-09 12:51
@joee why don’t you do it at deployment init function ?

bfuentes
2016-12-09 12:51
you do an external batch to do the calls

bfuentes
2016-12-09 12:52
or send one transaction with a huge payload containing 10K items

joee
2016-12-09 13:22
Thanks. I'll look at that

ramvi
2016-12-09 13:27
What is the roadmap for fabric 1.0 release?


ramvi
2016-12-09 14:51
Thank you, but is there a estimation for when we reach v1.0, for when re ran release stable solutions on hyperledger

mdevilliers
2016-12-09 14:58
has joined #fabric

bfuentes
2016-12-09 15:02
@ramvi well, no date. Expect something to pop up around Q2 2017 ?

bfuentes
2016-12-09 15:02
is open source project, so we never know XD

joee
2016-12-09 15:07
Thanks :slightly_smiling_face:

stevenroose
2016-12-09 15:35
Question: How does Fabric handle limiting chaincode execution? Like protection from endless loops, deadlocks, ...?

bfuentes
2016-12-09 15:38
@stevenroose this is a good question. No idea if a timeout exists on a transaction call

stevenroose
2016-12-09 15:39
Anyone with an answer?

stevenroose
2016-12-09 15:39
:slightly_smiling_face:

muralisr
2016-12-09 15:45
@stevenroose @bfuentes theres a timeout on call but that’s pretty much it (currently at least). in the v1.0 ’s endorsement model (pre consensus) its less of an issue

stevenroose
2016-12-09 15:48
@muralisr how so? what changes in v1.0 with this regard?

bfuentes
2016-12-09 15:49
@muralisr what happens when 2 calls are done at same time to a chaincode ? Does blocking depends on how is coded the chaincode ? No multi instance of the container ?

muralisr
2016-12-09 15:51
@stevenroose chaincode is executed before consensus - https://jira.hyperledger.org/browse/FAB-37

muralisr
2016-12-09 15:51
@bfuentes currently serial exec so, it would affect

bfuentes
2016-12-09 15:52
@muralisr Thread-safe programming so

muralisr
2016-12-09 15:53
definitely

bfuentes
2016-12-09 15:54
is multi-container a potential good solution for improving performances ?

bfuentes
2016-12-09 15:55
@muralisr today, the container’s name is the hash of the code, but Fabric could start hash-1, hash-2 … etc , in case a high volume of request is done

bfuentes
2016-12-09 15:55
like a clever load balancer start ne containers on demand

bfuentes
2016-12-09 15:56
maybe is problematic dealing with channel ...

bfuentes
2016-12-09 15:56
have to duplicate it also

arnaud
2016-12-09 16:30
@joee @bfuentes the target date for 1.0 is actually March

arnaud
2016-12-09 16:31
whether it will be met is another question but at least that's the goal

joee
2016-12-09 16:42
Ty

garisingh
2016-12-09 17:03
@bfuentes - are you taking multi-container for chaincode?

garisingh
2016-12-09 17:04
problem is that you have to serially process transactions

frank
2016-12-10 17:25
has joined #fabric

ruslan
2016-12-10 20:28
has joined #fabric

darije.ramljak
2016-12-11 21:55
has joined #fabric

vdods
2016-12-12 01:07
Hi all, is there any sort of event-based notification for when a transaction fails with error? For example, using HFC, I get a "complete" event when the transaction completes successfully, but I only get "error" once HFC has timed out and it has guessed that the transaction has failed. My use case is for example attempting to transfer an asset from person X to person Y and that failing say for permissions reasons. The transferring party/parties should be notified not only when the failure happens but the reason for failure as well.

vdods
2016-12-12 01:08
I suppose I could make my own chaincode event, but it seems like notification upon the failure of a transaction is just as important as notification upon success, so it stands to reason this would be a built-in feature.

perrytheguy
2016-12-12 04:37
has joined #fabric

stylix
2016-12-12 09:14
@stevenroose it seems to be 30s from our test, and it seems to be a hard coded one. And this timeout leads to the issue here https://jira.hyperledger.org/browse/FAB-1163

bfuentes
2016-12-12 09:39
@vdods , at the moment, i am recording errors on the world state, then having a function to retrieve the error message. I see ERR log on the peer, but i would like too to have the error propagated

bfuentes
2016-12-12 09:41
@garisingh It was just a thought . Some people have high frequency constraints.

pd93
2016-12-12 12:08
Does anyone know how I would go about sending an Invoke or Query call from another Go program? (Rather than using the Node or Java SDKs)

tim.blankers
2016-12-12 13:09
Is it possible to connect another peer (say, vp4) to the Bluemix Blockchain Service? What would the _enrollsecret_ be?

bfuentes
2016-12-12 13:12
you can use HTTP or GRPC calls

pd93
2016-12-12 13:19
@bfuentes Thanks. I was just looking into grpc. Am I right in thinking that GRPC is preferred? From a security point of view

bfuentes
2016-12-12 13:19
NodeSDK is using GRPC, new JavaSDK too. HTTP will be deprecated soon

pd93
2016-12-12 13:23
Ok great. Last thing. Should I be making my own .proto files or are there some already made that I can reuse

bfuentes
2016-12-12 15:37
@pd93 .proto from Fabric, js or java classes are included on SDK. Otherwise you will have to generate the output files yourself

jgcarv
2016-12-12 15:53
has joined #fabric

astepanov
2016-12-12 16:25
I found why it's empty. You should just pass `attrs` argument on HFC invoke. More details in this example https://github.com/IBM-Blockchain/car-lease-demo/blob/master/Server_Side/tools/utils/util.js#L31 Hope it will help someone else!

colyerfs
2016-12-12 20:32
has joined #fabric

colyerfs
2016-12-12 20:33
Hi guys I'm working on a new fabric project, and I'm doing my first cloud application - I'm looking for some advice on what consensus options I have with these considerations: 1. Need one network node on an AWS server 2. Several developer machines connecting intermittently on the network

colyerfs
2016-12-12 20:33
can I use noops in this case?

ghaskins
2016-12-12 20:37
if you only have one node, you probably don't have much of a choice

colyerfs
2016-12-12 20:38
that's what I figured, pbft can't run without other nodes - the developer machines are only going to be connected intermittently so they'd essentially be NVP's

ghaskins
2016-12-12 20:38
right

mdavid
2016-12-13 00:45
has joined #fabric

ibmamnt
2016-12-13 00:56
Hi, I'm now evaluating latest fabric (pre v1.0 or 0.7 ??). I wonder if I can still use "membersrvc" which comes with 0.6 for CA or not. Looks like COP project does not provide Docker image (I heard it's under plan, and heavy development is expected in this month).

keithsmith
2016-12-13 01:14
There is no docker image for COP but it is also very easy to install as follows

keithsmith
2016-12-13 01:14

keithsmith
2016-12-13 01:14
For now, you'll need one other command as follows

keithsmith
2016-12-13 01:15
mv $GOPATH/bin/cli $GOPATH/bin/cop

keithsmith
2016-12-13 01:15
or if you have $GOROOT set ...

keithsmith
2016-12-13 01:15
mv $GOROOT/bin/cli $GOROOT/bin/cop

keithsmith
2016-12-13 01:17
go 1.6 is the only prereq

keithsmith
2016-12-13 01:18

keithsmith
2016-12-13 01:23
That said, you can monitor the following change sets for when docker and docker-compose are merged



ibmamnt
2016-12-13 02:40
@keithsmith Thanks for the info. I'll experiment with COP on native env. for now, and watch those pull requests.

ankitkamra
2016-12-13 05:22
hi all, i have setup 2 peers on different machines, in hyperledger explorer's network information section it shows same IP of both peers i.e. 172.17.0.2. How can i give different IP's to these peers ?

ibmamnt
2016-12-13 05:56
I guess explorer shows the result of /network/peers which happened to be the same ip address of peer host (i.e. Docker network).

ibmamnt
2016-12-13 05:58
And question to this channel. How do I invoke restAPIs in latest fabric ? Is it gone ?? For example, I run "orderer" and "peer" in native machine, then run "curl localhost:7050/chain" gives me "??" message, and orderer shows like: ```2016/12/13 14:50:35 transport: http2Server.HandleStreams received bogus greeting from client: "GET /chain HTTP/1.1\r\nHos"```

ibmamnt
2016-12-13 05:59
And peer only expose "gRPC port". Is there any switch to turn on RESTAPI ?

ankitkamra
2016-12-13 06:41
@ibmamnt its shows the result of rest api. But i need to change the ip address for each peer.

ankitkamra
2016-12-13 06:42
btw according to my knowledge rest api will be deprecate in fabric v1.0

ibmamnt
2016-12-13 07:28
@ankitkamra Thanks for rest api info. As for blockchain explorer, I guess you need to modify explorer code to return host ip/port (iptables or docker-compose ps). Or prepare mapping table in a file, and read it in stead of using /network/peers.

ankitkamra
2016-12-13 07:33
but i want to use rest api's . it should return the actual IP Address of machine through API

ry
2016-12-13 07:49
ankitkamra: I wouldn't build on top of the REST apis, since, as you noted, they're going away

ankitkamra
2016-12-13 07:54
@ry actually i am building an application over fabric-java-sdk and if i register master peer with the sdk, sdk will get information of all renaming peers in the network and will get same address for each peer. now if master peer gets down it will search for docker IP i.e. 172.17.0.1 that does not exist on the network. So i want to know is there any mechanism using which each peer should expose its physical IP.

ewold
2016-12-13 08:41
has joined #fabric

pd93
2016-12-13 11:15
@pd93 uploaded a file: https://hyperledgerproject.slack.com/files/pd93/F3E2HSQR0/protos_compilation_error.sh and commented: Trying to use the `*.pb.go` files in `fabric/protos` (by including the 'protos' package from fabric) to connect to my blockchain through an external go program, but I get the following error while compiling the code. Does anyone know why this func is redeclared?

pd93
2016-12-13 11:16
Using v0.6 ^^^

aharbis
2016-12-13 13:27
has joined #fabric

cbf
2016-12-13 13:53
@ibmamnt REST is gone from v1.0 for now...

svergara
2016-12-13 14:38
has joined #fabric

rafael.turk
2016-12-13 15:13
has joined #fabric

ibmdannywong
2016-12-13 15:38
hi, one question about security to double confirm my understanding is correct

ibmdannywong
2016-12-13 15:39
Data stored in State is literally unprotected unless we are coding protection around it, right?

ibmdannywong
2016-12-13 15:39
for example, we cannot control who have access right to get particular key

gee
2016-12-13 16:40
has joined #fabric

arner
2016-12-13 20:07
right @ibmdannywong, world state is stored unencrypted and can be read by any peer.

arner
2016-12-13 20:08
Question: are there plans to create docker images for ARM architecture?

ry
2016-12-13 20:12
arner: right now only x86_64, P, and Z are on deck

arner
2016-12-13 20:14
Alright is there a script to compile the peer/membersrvc/baseimage and generate the images? I might try to cross compile them to easily run a node on a raspberry pi :slightly_smiling_face:

ry
2016-12-13 20:18
sure, take a look at any of these jobs in read-only mode: https://jenkins.hyperledger.org/view/fabric-baseimage/search/?q=docker

ry
2016-12-13 20:19


arner
2016-12-13 20:37
Thanks @ry. So to do manually would mean get the vagrant environment up, checkout the right branch, set environment variables and do ‘make docker’?

arner
2016-12-13 20:37
Does it have any way of knowing which docker image to use as a base of the baseimage?

ry
2016-12-13 20:37
I'm not sure you need vagrant, @ghaskins has done a lot of work to allow for pure docker standup

ghaskins
2016-12-13 20:44
@arner the baseimage can be built by checking out fabric-baseimage.git and running "make docker-local'

ghaskins
2016-12-13 20:45
and the main tree links to that via fabric.git/.baseimage-release

ghaskins
2016-12-13 20:55
from there: "make native" will generate local binaries, and "make docker" will generate the other images as a function of baseimage

ghaskins
2016-12-13 20:56
you may or may not need vagrant to complete the second part, depending on your host environment

ghaskins
2016-12-13 20:56
but if you are targetting Pi, best to try to not need it

ghaskins
2016-12-13 20:56
I can guide you on the necessary prerequisites for the host

ghaskins
2016-12-13 20:57
we don't support cross-compiling (yet), but we do support multi-arch compilation if you have a suitable host for the $arch in question

ghaskins
2016-12-13 20:58
so, this means you'll probably need to do a lot of this on the Pi iteself, unless you have another suitable/compatible ARM platform

arner
2016-12-13 21:00
Ha you keep answering my questions before I finished typing. Ok I will try to do this when I have access to a Pi again. Do I need things like RocksDB on the host or is it just basic build stuff that needs to be there? Would prefer not to use vagrant indeed.

ghaskins
2016-12-13 21:00
master no longer requires librocksdb

ghaskins
2016-12-13 21:00
if you want to build the v0.6 branch, that is a different question

arner
2016-12-13 21:01
Yes that would be my goal for now. Looks like an interesting weekend project coming up :wink:

ghaskins
2016-12-13 21:01
basically you just need a unix platform with make, git, golang v1.6 or higher, and docker

ghaskins
2016-12-13 21:01
(docker-compose, if you want to run the unit-tests too)

arner
2016-12-13 21:01
Ok great. And librocksdb

ghaskins
2016-12-13 21:01
yes, though note that the build proceedure for v0.6 is slightly different

ghaskins
2016-12-13 21:02
1) the baseimage is part of fabric.git (see images/base) in v0.6

ghaskins
2016-12-13 21:02
2) you still need librocksdb (as you have noted)

ghaskins
2016-12-13 21:02
3) the linkage from fabric->baseimage is in fabric.git/images/base/release

ghaskins
2016-12-13 21:02
I cant think of any other major differences

ghaskins
2016-12-13 21:03
but ill ping back if they occur to me

arner
2016-12-13 21:03
Thanks a lot!

ghaskins
2016-12-13 21:03
unforunately in v0.6 youll probably need a lot more substrate, like protoc, node, etc

ghaskins
2016-12-13 21:03
most of that is no longer required on the host in master, but that only went in recently

ghaskins
2016-12-13 21:03
i have to step away, bbiab

arner
2016-12-13 21:18
@ghaskins I can find `make docker` in the images/base/Makefile. Are the four lines in https://github.com/hyperledger/fabric/blob/v0.6/images/app/Dockerfile.in actually all you need to copy in the compiled memberservice and peer respectively to create those images? Or am I missing the script that creates those?

arner
2016-12-13 21:21
Ah right, `make images` from the root should do the trick.

jeno.gocho
2016-12-13 23:31
has joined #fabric

cdutra
2016-12-14 02:06
has joined #fabric

kenzhang
2016-12-14 03:00
has joined #fabric

amarpreet
2016-12-14 03:53
Is there a way to disable color logging in the peer?

phoolet
2016-12-14 08:51
has joined #fabric

ibmdannywong
2016-12-14 09:41
@arner Thanks mate for confirming my understanding

sarkoi
2016-12-14 12:33
has joined #fabric

ghaskins
2016-12-14 14:04
@arner yep, thats another difference: it was "make images" in previous releases, now "make docker" in mainline

ghaskins
2016-12-14 14:04
(the rationale was that "images" was too vague, so now there is "make native" for native binaries and "make docker" for docker images

ghaskins
2016-12-14 14:05
note that there are rules to target a specific image too: e.g. "make peer-image" or "make peer-image-clean"

ghaskins
2016-12-14 14:05
(which s/image/docker in mainline)

thojest
2016-12-14 14:21
short question: after git cloning v0.6 fabric, what is the difference between `sudo make` and `sudo make peer`

yvescandel
2016-12-14 15:36
has joined #fabric

colyerfs
2016-12-14 19:17
Does Fabric have a built-in method like Get() that can pull/fetch data from the network?

vdods
2016-12-14 21:11
@colyerfs Can you give a little more context? The shim.ChaincodeStubInterface interface provides a way for golang-based chaincode to get/set the ledger state. If you're thinking about e.g. a web app retrieving data from the ledger, then one could use the HFC module (fabric-sdk-node) to submit a query request to a peer for the relevant data

colyerfs
2016-12-14 21:23
@vdods sorry for the vague question, typed it out quick... yes I was referring to a web app retrieving data from the ledger

colyerfs
2016-12-14 21:24
so I'll take a look at the HFC module

colyerfs
2016-12-14 21:25
how would I go about querying data? is there a specific method in HFC?

vdods
2016-12-14 21:26
@colyerfs There's no generic built-in way, but you can easily define your own query method in chaincode. Which version of fabric are you working with?

colyerfs
2016-12-14 21:28
@vdods gotcha - v0.6, so I'd define the query in a chaincode event?

vdods
2016-12-14 21:30
@colyerfs Not an event, but chaincode yes. Take a look at chaincode_example02.go for a really simple example, and take a look at fabric/sdk/node/test/unit/chain-tests.js for how to use HFC to invoke/query/etc

vdods
2016-12-14 21:32
Running the HFC unit tests as is is a little tricky, but if you want a simpler way to do it, I've made a fork of fabric v0.6 which dockerizes the HFC unit tests. https://github.com/vdods/fabric/blob/dockerize-unit-tests/sdk/node/dockerized-unit-tests-readme.md

slender
2016-12-14 23:43
has joined #fabric

david_rintoul
2016-12-15 03:09
has joined #fabric

tzukru
2016-12-15 07:19
has joined #fabric

joseph
2016-12-15 08:59
Hi guys,

joseph
2016-12-15 09:00
How to set up timeout for transaction?

baohua
2016-12-15 10:21
hi, with latest master code, there’s error msg with `make peer`

baohua
2016-12-15 10:21
$ make peer mkdir -p build/image/ccenv/payload cp build/docker/gotools/bin/protoc-gen-go build/bin/chaintool build/goshim.tar.bz2 build/image/ccenv/payload cp: cannot stat ‘build/docker/gotools/bin/protoc-gen-go’: No such file or directory make: *** [build/image/ccenv/payload] Error 1

baohua
2016-12-15 10:21
I run `make gotools`, but not affect the `build/docker/gotools/bin/` path

baohua
2016-12-15 10:23
Thanks for any hint!

yacovm
2016-12-15 10:45
ask in #fabric-dev-env

baohua
2016-12-15 11:05
sure, thanks yacov

colyerfs
2016-12-15 13:48
Are there any Fabric commands to reset the network and clear the data? I'm looking for a way to clear my test environment easily in between test runs

kamo
2016-12-15 13:53
has joined #fabric

kamo
2016-12-15 14:59
@ghaskins i cloned the current master branch, successfully run make in the fabric-baseimage folder and got the following error while running “make native” in the /github/hyperledger/fabric folder.. (Using OS X)

kamo
2016-12-15 14:59

kamo
2016-12-15 15:00
im sure its a pretty stupid mistake :confused:

raj
2016-12-15 16:56
has joined #fabric

anya
2016-12-15 19:06
@anya has left the channel

vdods
2016-12-15 19:48
@colyerfs Good point -- me too

colyerfs
2016-12-15 19:59
@vdods docker-compose -f myfile.yaml down

colyerfs
2016-12-15 19:59
or delete docker containers and reload

vdods
2016-12-15 20:00
@colyerfs Ah, yeah, that works, but I thought you meant a way to tell the peers to wipe their state while they're still running :slightly_smiling_face:

vdods
2016-12-15 20:02
It would be a useful dev function -- reset state without needing to worry about docker containers, say if you want to provide a "reset demo" feature for a demo web app without requiring the user to issue commands in a shell.

colyerfs
2016-12-15 20:07
@vdods that's originally what I was looking for, I've yet to find such a magic bullet haha

colyerfs
2016-12-15 20:07
would be nice to have

hschell
2016-12-16 14:49
has joined #fabric

haifeng
2016-12-17 14:49
has joined #fabric

janmike
2016-12-18 17:06
has joined #fabric

janmike
2016-12-18 17:06
Hi. Why does BlueMix only offer up to 4 nodes / peers? Whereas some use cases would require more than that?

scottz
2016-12-18 21:27
BlueMix offers a sample network in v0,5 and v0.6, so people can get some experience with it and get to know how it works. I would expect different offerings for v1.0, since the architecture is changing.

janmike
2016-12-19 00:09
ah got it. Thank you

ibmamnt
2016-12-19 03:45
Quick question, "submitting peer" has been removed from latest v1.0 spec. Is this correct ? My understanding "submitting client" directly connect to endorser (endorsing peer).

janmike
2016-12-19 08:26
Once 1.0 is rolled out March 2017 as per the schedule shared, will we get more than 4 peers within the network?

bfuentes
2016-12-19 09:18
@janmike you are talking about Bluemix Blockchain as a Service

bfuentes
2016-12-19 09:18
today, you can have more than 4 peers if you run the network yourself

bfuentes
2016-12-19 09:19
I guess, Bluemix service will evolve for next release to enable dynamic peer number

garisingh
2016-12-19 09:24
@janmike - the purpose of the Bluemix service(s) was to provide a "sandbox" environment to demonstrate Fabric capabilities. And while there is/was no theoretical limit to the number of peers in a Fabric v0.6-based network, you needed to define the number up front. So we picked 4 in Bluemix as it fits the "3f+1" BFT model so that we could show all of the features of Fabric (e.g. you can stop 1 peer and the network still moves forward, you can stop 2 peers and the network will halt, you can restart a peer, etc). Of course V1 offers the ability for peers to be dynamically added to Fabric networks so that makes things a lot easier in terms of the types of services which can be delivered

janmike
2016-12-19 09:27
I was about to return here and state the same point. Thank you both for the response, I did my reading again and mis interpreted. Also read the PBFT protocols

janmike
2016-12-19 09:27
Thanks @bfuentes and @garisingh

janmike
2016-12-19 09:28
I'm now assessing as to the cost of running fabric on my own - or look to BlueMix for that altogether.

garisingh
2016-12-19 09:29
sounds good @janmike - feel free to ping me directly if you have any specific questions about the Bluemix services (my team actually owns building and delivering those Bluemix services)

janmike
2016-12-19 09:29
My worry is the cost for a 4-node training and trial landscape -- is already at 10k. I'm hopeful someone releases a proper BaaS as that of Azure's Ethereum

janmike
2016-12-19 09:30
Fantastic @garisingh -- im building up a business case to make a decision on whether to invest effort on Fabric or Ethereum.

janmike
2016-12-19 09:31
I'm leaning towards Fabric over Ethereum to be honest as our customers are mostly Enterprise

pd93
2016-12-19 10:29
Anyone know why I'm getting this error? `cannot use con (type *"http://github.com/pd93/fabric-sdk-go/vendor/google.golang.org/grpc".ClientConn) as type *"http://github.com/hyperledger/fabric/vendor/google.golang.org/grpc".ClientConn in argument to protos.NewDevopsClient`

bfuentes
2016-12-19 12:41
@pd93 the package path is different “http://github.com/pd93"

bfuentes
2016-12-19 12:42
i think , you should import the type expected from this package path “http://github.com/hyperledger/fabric/vendor/google.golang.org/grpc"

pd93
2016-12-19 12:45
@bfuentes if I use the package that is vendored with Fabric, I get this: `imports http://github.com/hyperledger/fabric/vendor/google.golang.org/grpc: use of vendored package not allowed` :confused:

garisingh
2016-12-19 12:55
@pd93 - what exactly are you trying to do? I assume build a Go-based SDK for Fabric v0.6?

garisingh
2016-12-19 12:55
looks like you are vendoring both fabric and grpc-go in your project?

pd93
2016-12-19 12:58
@pd93 uploaded a file: https://hyperledgerproject.slack.com/files/pd93/F3H63U63Y/imports.go and commented: @garisingh essentially, yes. It's just a lightweight wrapper for the GRPC calls. My imports are above

pd93
2016-12-19 12:58
There is no `/vendor` folder in my project

garisingh
2016-12-19 13:18
``` cannot use con (type *"http://github.com/pd93/fabric-sdk-go/vendor/google.golang.org/grpc".ClientConn) as type *"http://github.com/hyperledger/fabric/vendor/google.golang.org/grpc".ClientConn in argument to protos.NewDevopsClient ``` can you post the code that was generating that error? And is it safe to assume that you have the Fabric v0.6 source directly in your GOPATH (you said it was not vendored)

pd93
2016-12-19 13:22
@pd93 uploaded a file: https://hyperledgerproject.slack.com/files/pd93/F3FQE4RUY/-.go and commented: In this snippet, it is line 11 causing the issue. I'm assuming it doesn't like the type that the GRPC package is returning. Yes, I have a full copy of fabric 0.6 in my gopath

ahmedelhajji
2016-12-19 13:37
Hello, I would like an example of a docker-compose.yml file or use swarm to deploy multiple containers in several machines connected with swarm. For example 3 containers vp0 vp1 vp2.

garisingh
2016-12-19 14:10
@pd93 - so I got this to work by "vendoring" both the grpc and fabric packages within my project

pd93
2016-12-19 14:13
@garisingh Great, thanks! When you say vendor, I assume you mean using something like `govend` to add the packages to a `/vendor` folder?

garisingh
2016-12-19 14:15
yeah - I used go vendor Basically, within the root folder of my project: `govendor init` `govendor add +external`

pd93
2016-12-19 14:26
@garisingh I've run those two commands, but it only vendored parts of fabric (protos and core/util) and I'm now getting `undefined grpc in grpc.Dial`. Is this a separate issue?

yacovm
2016-12-19 14:27
Did you import it?

garisingh
2016-12-19 14:28

garisingh
2016-12-19 14:29
@pd93 - that's what my test has in it

pd93
2016-12-19 14:29
@yacovm No I didn't :') Thanks, both of you

pd93
2016-12-19 14:29
All working now

kenzhang
2016-12-19 15:05
pulled down the latest code today, trying to run the chaincode_example02 as a test, I am getting error: `unknown service protos.ChaincodeSupport``

kenzhang
2016-12-19 15:06
I have orderer and a vp containers running. Am I missing something?

muralisr
2016-12-19 15:07
@kenzhang what instructions are you using for the test please ?

kenzhang
2016-12-19 15:08
I am not following any doc. Just started the orderer and VP containers using fabric/test/docker-compose.yaml, and then trying to run the following: `CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=172.17.0.2:7050 ./chaincode_example02`

kenzhang
2016-12-19 15:11
172.17.0.2 is the ip of the orderer node

bkimminich
2016-12-19 16:12
has joined #fabric

mohamoudegal
2016-12-19 21:38
has joined #fabric

mohamoudegal
2016-12-19 21:38
Hello everyone

mohamoudegal
2016-12-19 21:38
My name is Mohamoud Egal, and I recently pulled the Fabric code from Github and have been working on my Blockchain developer skills

mohamoudegal
2016-12-19 21:38
I have run into 2 issues

mohamoudegal
2016-12-19 21:46
@mohamoudegal uploaded a file: https://hyperledgerproject.slack.com/files/mohamoudegal/F3GPALWQ2/screen_shot_2016-12-19_at_4.37.44_pm.png and commented: Firstly, I can't type into this body of text. According to the tutorial I am following there is text that should be put in the body.

mohamoudegal
2016-12-19 21:46

mohamoudegal
2016-12-19 21:46
sorry for the double post

mohamoudegal
2016-12-19 21:47
@mohamoudegal uploaded a file: https://hyperledgerproject.slack.com/files/mohamoudegal/F3GRWG9K7/screen_shot_2016-12-19_at_4.46.54_pm.png and commented: I can't find the query() in chain code.go

mattgallea
2016-12-20 00:14
has joined #fabric

anandkarwa
2016-12-20 08:41
has joined #fabric

jonathan.tan
2016-12-20 10:53
has joined #fabric

pd93
2016-12-20 11:16
@mohamoudegal looks like you're trying to type into the response body instead of the request body

ahmedelhajji
2016-12-20 13:56
Hello, I have a problem deploying docker container in several machines after what I am trying to try the docker swarm but the problem when i builde my docker-compose.yml file i cant get to The deployer with docker, for the moment I do not know if this is the good track I chose or it must go through another track. I would like feedback on the level of aploeiment in several machines

garisingh
2016-12-20 14:20
@ahmedelhajji - could you explain a bit more what you are trying to do, what you've done and the errors you are seeing?

ahmedelhajji
2016-12-20 15:11
@garisingh now i want to deploy my containers on several physical machines because for now I work in standalone mode

ahmedelhajji
2016-12-20 15:13
In my file docker-compose.yml I have 4 containers vp0 vp1 vp2 and vp3

ahmedelhajji
2016-12-20 15:13
I want to deploy the containers in 2 machines

ahmedelhajji
2016-12-20 15:17
For now I have tried with docker swarm to make a master slave architecture to deploy from my server docker master but I can't

name63
2016-12-20 15:18
maybe you would like to try docker-machine?

ahmedelhajji
2016-12-20 15:18
For now I just want feedback on how can deploy on multiple machines

ahmedelhajji
2016-12-20 15:20
I tryed with docker-machine, but I think it is necessary to go through docker swarm because it is the solution docker distribute

name63
2016-12-20 15:22
mostly it depends on the scale of your docker network and the amount of docker containers you are managing

name63
2016-12-20 15:24
since you have just 4 of them, you can bootstrap two docker-engine hosts and split your single docker-compose into two files: https://alexanderzeitler.com/articles/docker-machine-and-docker-compose-developer-workflows/

garisingh
2016-12-20 15:25
@ahmedelhajji - the only real "trick" here is getting the networking correct

ghaskins
2016-12-20 15:33
@ahmedelhajji: if you want to orchestrate a cluster of peers from one place/config, you want to use something like swarm or kubernetes

ghaskins
2016-12-20 15:33
If you don't mind managing the networking yourself, there are a ton of options

ghaskins
2016-12-20 15:36
Like @garisingh said, the main thing is managing the network config: platforms like swarm/kubernetes will do this for you, or you can manage it manually if you know what you are doing

ghaskins
2016-12-20 15:36
For 4 peers, either methodology will work

ahmedelhajji
2016-12-20 15:42
@ghaskins yes for now im using swarm but when I build my docker-compose.yml file and I execute docker-compose bundle I get file "mycc.deb" after that I execute the deploy docker deploy mycc I have this error "only supported with experimental daemon" . So i looked for a solution and it seems that "experimental" flag must be set to true... Unfortunately mine is stuck to false. Am I doing something wrong or is it a good hint to follow?

garisingh
2016-12-20 15:51
@ahmedelhajji - prior to Docker 1.13, experimental features were not built-in to the standard daemon distribution(s) - https://experimental.docker.com/builds/

ahmedelhajji
2016-12-20 16:04
i have this error when i execute dockerd WARN[0000] Running experimental build INFO[0000] libcontainerd: previous instance of containerd still alive (12282) INFO[0000] [graphdriver] using prior storage driver "aufs" FATA[0001] Error starting daemon: timeout

ahmedelhajji
2016-12-20 16:05
but I don't have any containerd in this process 12282

ghaskins
2016-12-20 16:21
@ahmedelhajji sorry, I don't have operational experience with swarm, I just understand its function architecturally

ghaskins
2016-12-20 16:22
fwiw, I build our prototypes on openshift origin, its quite nice

ahmedelhajji
2016-12-20 16:32
oh ok, thank you for your help i will take a look at openshift origin

ghaskins
2016-12-20 17:21
@ahmedelhajji to be clear: kubernetes/openshift will be significantly more effort to learn/stand-up compared to docker-compose (and, IIUC, swarm)

ghaskins
2016-12-20 17:22
its more suited to a production deployment

ghaskins
2016-12-20 17:22
if you just want to hack around, theres probably much easier paths

name63
2016-12-20 21:15
Hi, How do I write java chaincode with access control? There is no such example, except the one in go, but i'm failing to find similar methods in java sdk

name63
2016-12-20 21:15
do they ever exist?

sako
2016-12-21 02:52
has joined #fabric

mohamoudegal
2016-12-21 04:04
@pd93 thanks for your help.

mohamoudegal
2016-12-21 04:05
@mohamoudegal uploaded a file: https://hyperledgerproject.slack.com/files/mohamoudegal/F3GLNTB3J/screen_shot_2016-12-20_at_11.04.06_pm.png and commented: Does anyone know where I can find the "enroll ID" and "Enroll Secret”?

sako
2016-12-21 06:55
@mohamoudegal I think it listed in membersrvc config file (membersrvc.yaml). See eca.users. https://github.com/hyperledger/fabric/blob/v0.6/membersrvc/membersrvc.yaml

joseph
2016-12-21 07:08
Hi,

joseph
2016-12-21 07:09
I run unit tests for the example asset_management02.

joseph
2016-12-21 07:09
When it went to this point: ledger, err := ledger.GetLedger(),

joseph
2016-12-21 07:10
it generated an error

joseph
2016-12-21 07:10

joseph
2016-12-21 07:10
Could you please give me an idea about it?

svasilyev
2016-12-21 12:14
has joined #fabric

benlewis
2016-12-21 14:31
has joined #fabric

benlewis
2016-12-21 14:32
Hi all, it seems that Fabric starts dropping connections if I try and make more than approximately 200/sec. Is this a Virtualbox limit with the devenv or is there a bottleneck

garisingh
2016-12-21 15:13
@benlewis - what do you mean by "dropping" connections? and which version are you using?

benlewis
2016-12-21 15:14
@garisingh I'm using v0.6 in the dev environment, after a certain number of connections, I'm getting an error message that the connection was refused

benlewis
2016-12-21 15:15
If I retry them a few times, they eventually go through. However, I have a suspicion it is being caused by VirtualBox

garisingh
2016-12-21 15:23
are you doing it all within VirtualBox or connecting from outside of VirtualBox? You might be running into a file descriptor limit in the latter. I think we up the number of descriptors within VirtualBox. Of course I would not do any stress testing with VirtualBox myself - I'd minimally move to using a pure Docker env

benlewis
2016-12-21 15:26
I'm connecting from outside of virtualbox

benlewis
2016-12-21 15:37
@garisingh It's only from outside from virtualbox it occurs, running the same client inside the devenv gives no errors

garisingh
2016-12-21 15:37
what's your host system?

benlewis
2016-12-21 15:37
Windows 10 x64

benlewis
2016-12-21 15:38
i7-3620qm (4 core, 8 thread) with 16gb of RAM & SSD

garisingh
2016-12-21 15:46
there used to be a concurrent connection limit on Windows systems. You might be hitting that

benlewis
2016-12-21 15:46
In theory, they removed it with Vista but it seems to be a network-based issue, so I'll migrate to running in Docker I think

mohamoudegal
2016-12-21 16:47
@sako I got it! thanks

mohamoudegal
2016-12-21 16:48
@mohamoudegal uploaded a file: https://hyperledgerproject.slack.com/files/mohamoudegal/F3HKG215Y/screen_shot_2016-12-21_at_11.45.24_am.png and commented: So I got the right id and secret, but I’m still getting an error.

mohamoudegal
2016-12-21 16:50
@mohamoudegal uploaded a file: https://hyperledgerproject.slack.com/files/mohamoudegal/F3HMRPLJ0/screen_shot_2016-12-21_at_11.44.30_am.png and commented: Does it matter which app I deployed? I deployed Marble then I deployed Example02. They’re both set to vp 0. Will that impact my use of Post man for REST? Please advice. Thank you in advance.

benlewis
2016-12-21 17:07
Does chaincode execute in a deterministic environment? I want to be able to verify RSA signatures but that involves a Random stream and random & distributed don't mixed

mike_dircz
2016-12-21 19:44
has joined #fabric

mike_dircz
2016-12-21 19:46
Following these directions: http://hyperledger-fabric.readthedocs.io/en/v0.6/Setup/Chaincode-setup/#chaincode-deploy-via-cli-and-rest Using option #2 docker images Trying to login with REST API: POST localhost:7050/registrar { "enrollId": "jim", "enrollSecret": "6avZQLwcUe9b" }

mike_dircz
2016-12-21 19:47
Error message: { "Error": "Openchain endpoint not found." }

mike_dircz
2016-12-21 19:47
Anyone have any tips on debugging?

mike_dircz
2016-12-21 19:49
Is there a log file I can look at for something like this?

silliman
2016-12-21 20:47
@mike_dircz are you absolutely sure you typed *registrar* correctly when you submitted your POST ... this message will occur if your URL contains a typo

mike_dircz
2016-12-21 20:51
this is exactly what I submitted with POST localhost:7050/registrar { "enrollId": "jim", "enrollSecret": "6avZQLwcUe9b" }

silliman
2016-12-21 20:54
@mike_dircz can you try submitting a *GET localhost:7050/chain* and tell us the output of that

mike_dircz
2016-12-21 20:58
@silliman here is the result { "height": 9, "currentBlockHash": "wRdRmJBcQNSgHvFxJYjXI+DL4UhKwoP0s/kqfR0Jn+YA6aNCYRADv9pTLDmDUQ0M/yDrP0czbNeAaPXS3aNANQ==", "previousBlockHash": "/DDV8US4zSXWv6as3h/FRls2QGCMfzY80Mi1JHNNNLr37jurKHamXtJDbNPNGnJfODmWAFs931hwAfcYdHt+gA==" }

silliman
2016-12-21 21:00
@mike_dircz ok so that is okay.... what tool are you using to submit the POST? e.g., curl, or POSTMAN, something else?

mike_dircz
2016-12-21 21:01
POSTMAN

silliman
2016-12-21 21:03
@silliman uploaded a file: https://hyperledgerproject.slack.com/files/silliman/F3HM7RNMR/pasted_image_at_2016_12_21_04_03_pm.png and commented: @mike_dircz so when you submit it your screen looks something like this?:

silliman
2016-12-21 21:11
@silliman uploaded a file: https://hyperledgerproject.slack.com/files/silliman/F3HMBE7EX/pasted_image_at_2016_12_21_04_11_pm.png and commented: @mike_dircz I'm wondering if you aren't putting the POST body on the line for the URL instead of down below like my prior image, because as an experiment I put it all on the same line and got the *Openchain endpoint not found" message....

mike_dircz
2016-12-21 21:15
@silliman I was doing exactly what you said. I'm such a novice at all of this. Now that I placed the parameters in the Body tab, it works fine. Thanks for your patience.

silliman
2016-12-21 21:17
@mike_dircz no problem, glad I could help!

mike_dircz
2016-12-21 21:18
@silliman now I can abandon the command line method!

shrike
2016-12-21 22:40
has joined #fabric

shakespeare
2016-12-22 02:59
has joined #fabric

kazumi-yoshida
2016-12-22 04:45
has joined #fabric

shakespeare
2016-12-22 05:29
@shakespeare pinned a message to this channel.

zainx01
2016-12-22 09:01
has joined #fabric

zainx01
2016-12-22 09:02
hi guys, i'm trying to set up a blockchain peer network using dedicated machines over a physical network. Is there a guide for this? I have tried to do the same using the guide for docker containers on the same machine and adapt it to my scenario but my peer nodes do not discover each other. Please help

ranjan008
2016-12-22 09:29
In pbft consensus multiple peer mode when i am deploying a chaincode i am getting the chaincode name which means the chaincode is deployed but the height of the chaincode is not increasing am i missing to set any relevant parameter?

haixu
2016-12-22 09:59
has joined #fabric

pjhaga
2016-12-22 10:44
has joined #fabric

benlewis
2016-12-22 11:23
When running Fabric in docker, is it necessary to forward ports?

ashishkel
2016-12-22 12:58
@benlewis In my knowledge, if you are running only one node, and if your host OS considers the port u are using inside docker as within user range, then it's not needed to forward the ports at all.

ashishkel
2016-12-22 13:02
But if you are running multiple docker nodes, then all the nodes listening on the same set of ports within the same host OS is not allowed. And in multi-node situation, you have to forward the ports to unique host ports for reliable operation.

wjq
2016-12-22 13:04
has joined #fabric

benlewis
2016-12-22 13:19
for multiple validating peers per the documentation, it seems there's something missing from the docker-compose up file

benlewis
2016-12-22 13:19
as it's missing the link to membersrvc

pjhaga
2016-12-22 13:43
Channel, I have trouble with using proto.Unmarshal in my chaincode. I try to unmarshal a shim.Row from bytes. The problem is that this works when I place this function inside the fabric, for example vendor/github.com/hyperledger/fabric/core/chaincode/shim/chaincode.go. However, when I try to proto.Unmarshal outside the fabric it does not properly unmarshal the bytes, but neither does it give an error. Has anyone encountered this problem before or know why the proto.Unmarshal is not usable outside the fabric?

nickygencs
2016-12-22 15:41
has joined #fabric

yuwei
2016-12-22 16:12
has joined #fabric

markparz
2016-12-22 16:29
If you are not subscribed to the hyperledger fabric channel on youtube already please go out and do so to receive automatic notifications…. Otherwise you might have missed another great video showing how to upgrade chaincode, thank you @yaoguo!! https://youtu.be/hlJmRKo8HXE

vijayr24
2016-12-22 16:58
Hi all, I am building the fabric from scratch and getting the following error when I run the command make unit-test. Any pointers on how to fix this error? _Starting peer..DONE! Running tests... ? http://github.com/hyperledger/fabric/bddtests/chaincode/go/table [no test files] ok http://github.com/hyperledger/fabric/bddtests/syschaincode/noop 0.015s coverage: 71.0% of statements ? http://github.com/hyperledger/fabric/build/docker/gotools/obj/gopath/src/github.com/AlekSi/gocov-xml [no test files] ok http://github.com/hyperledger/fabric/build/docker/gotools/obj/gopath/src/github.com/axw/gocov 0.001s coverage: 100.0% of statements package http://github.com/hyperledger/fabric/build/docker/gotools/obj/gopath/src/github.com/axw/gocov/gocov imports http://github.com/axw/gocov/gocov/internal/testflag: use of internal package not allowed error: exit status 1 panic: EOF goroutine 1 [running]: panic(0x4daca0, 0xc42000a140) /usr/local/go/src/runtime/panic.go:500 +0x1a1 main.main() /home/ledger/hyperledger/gocode/src/github.com/AlekSi/gocov-xml/gocov-xml.go:60 +0x15fd Stopping peer.. make: *** [unit-test] Error 2_

mohamoudegal
2016-12-22 17:36
@mohamoudegal uploaded a file: https://hyperledgerproject.slack.com/files/mohamoudegal/F3J4EJ5J8/screen_shot_2016-12-22_at_12.25.25_pm.png and commented: Good afternoon. I have a Bluemix “Marble” & Example 02 instances deployed. The url I used in this post request was for vp1 from the Credentials file on Bluemix (I’ll post below). What I am not sure about is if it’s running and whether or not my Post request is connecting to my Bluemix instance.

mohamoudegal
2016-12-22 17:38
@mohamoudegal uploaded a file: https://hyperledgerproject.slack.com/files/mohamoudegal/F3J4EKN12/screen_shot_2016-12-22_at_12.36.52_pm.png and commented: I got a different error message when I used https instead of http. But I’m still stuck.

mohamoudegal
2016-12-22 17:43
nvm I fixed it. Thanks anyway

mike_dircz
2016-12-22 19:56
using chaincode_example02 with REST APIs. Anyone know why the query command fails every time? The deploy and invoke commands work just fine. POST localhost:7050/chaincode { "jsonrpc": "2.0", "method": "query", "params": { "type": 1, "chaincodeID":{ "name":"mycc" }, "ctorMsg": { "args":["query", "a"] }, "secureContext": "jim" }, "id": 5 } Error message is: 13:47:29.555 [shim] DEBU : [80a15e2a]Handling ChaincodeMessage of type: RANGE_QUERY_STATE(state:ready) Error starting Simple chaincode: Error handling message: [80a15e2a-b59a-4501-8529-b495b472589c]Chaincode handler FSM cannot handle message (RANGE_QUERY_STATE) with payload size (10) while in state: readyMikes-MacBook-Pro-3:chaincode_exampleE_PEER_ADDRESS=0.0.0.0:7051 ./chaincode_example02

silliman
2016-12-22 20:16
@mike_dircz Hi Mike, the deploy and invoke commands are asynchronous....they just return a "transaction id" but then if something goes wrong during the deploy or invoke, they won't tell you about it (at least not via the REST API...with the SDKs you can subscribe to events)..... on the other hand, query's are synchronous, so if something goes wrong you find out about it right away. I suspect that your deploy may have failed.

mike_dircz
2016-12-22 20:21
@silliman the results from the Deploy: { "jsonrpc": "2.0", "result": { "status": "OK", "message": "mycc" }, "id": 1 }

silliman
2016-12-22 20:24
@mike_dircz right, but, unfortunately, all that that's telling you is "I've submitted the deployment request OK".... it is not telling you whether the deployment completed successfully

mike_dircz
2016-12-22 20:25
hi @silliman, debugging tips?

silliman
2016-12-22 20:25
@mike_dircz IIRC, you are running with the docker images, are you running in chaincodedev mode?

ghaskins
2016-12-22 20:26
@mike_dircz simplest thing is to look at the peer logs

mike_dircz
2016-12-22 20:26
@silliman yes chaincodedev mode

silliman
2016-12-22 20:26
@mike_dircz yes, in your peer log you should see a message like this: ```20:12:14.350 [rest] ProcessChaincode -> INFO 01a REST processing chaincode request... 20:12:14.350 [rest] processChaincodeDeploy -> INFO 01b REST deploying chaincode... 20:12:14.351 [rest] processChaincodeDeploy -> INFO 01c Successfully deployed chainCode: mycc 20:12:14.351 [rest] ProcessChaincode -> INFO 01d REST successfully deploy chaincode: {"jsonrpc":"2.0","result":{"status":"OK","message":"mycc"},"id":1} ```

silliman
2016-12-22 20:27
hmm that does look a lot like what you posted in though, so there may be more to it than that

silliman
2016-12-22 20:29
@mike_dircz also, in the log for the chaincode, you should see several messages that start out with this at about the same time you submit the deploy... ```20:12:15.355 [shim] DEBU : [mycc]Received message INIT from shim 20:12:15.355 [shim] DEBU : [mycc]Handling ChaincodeMessage of type: INIT(state:established) 20:12:15.355 [shim] DEBU : Entered state init 20:12:15.355 [shim] DEBU : [mycc]Received INIT, initializing chaincode Aval = 100, Bval = 200 ```

silliman
2016-12-22 20:31
@mike_dircz my last code snippet is from the log output from the command to start chaincode_example02, not to be confused with the log output from peer which is what my first code snippet is from

silliman
2016-12-22 20:34
@mike_dircz One other thing seems a little odd to me... in the original output you posted a little while ago, there's this.... Error starting Simple chaincode: Error handling message: [80a15e2a-b59a-4501-8529-b495b472589c]Chaincode handler FSM cannot handle message (RANGE_QUERY_STATE) with payload size (10) while in state: readyMikes-MacBook-Pro-3:*chaincode_exampleE_PEER_ADDRESS=0.0.0.0:7051* ./chaincode_example02 maybe it's a cut-and-paste error, or maybe some bad output formatting from the fabric code, but see how chaincode_exampleE_PEER_ADDRESS=.. seems to have some squashing or truncation going on (i.e., why does is say E_PEER_ADDRESS and not CORE_PEER_ADDRESS) ... now that might be a red herring but it jumps out at me

silliman
2016-12-22 20:44
@mike_dircz something to verify- did you start the chaincode_example02 as a separate process as you must do in *chaincodedev* mode. As an experiment, I purposely skipped that required step, and then I went and submitted the deploy via the REST API, and I received the same result you posted ```{"jsonrpc":"2.0","result":{"status":"OK","message":"mycc"},"id":1}``` but, within the peer log this is an indication that something went wrong: ```20:40:45.789 [chaincode] Launch -> ERRO 01e sending init failed(handler not found for chaincode mycc)```

silliman
2016-12-22 20:47
@mike_dircz similarly, if I now POST an invoke while in this situation, my immediate response looks like everything is okay, i.e. ```{ "jsonrpc": "2.0", "result": { "status": "OK", "message": "ca050000-db27-4211-b144-078e10045466" }, "id": 3 }``` but if I look in my peer logs I see the real truth: ```20:45:43.366 [chaincode] Launch -> ERRO 024 You are attempting to perform an action other than Deploy on Chaincode that is not ready and you are in developer mode. Did you forget to Deploy your chaincode? ```

silliman
2016-12-22 20:50
@mike_dircz sadly, however, it's probably you have something else going on, as when I then submit a query, my error message is different from yours, I get this: ```{ "jsonrpc": "2.0", "error": { "code": -32003, "message": "Query failure", "data": "Error when querying chaincode: Error:Failed to launch chaincode spec(Could not get deployment transaction for mycc - LedgerError - ResourceNotFound: ledger: resource not found)" }, "id": 5 }```

mike_dircz
2016-12-22 21:00
hi @silliman I will chip away at each of those log files and see what it turns up. My peer logs don't contain any useful informations, so maybe I didn't turn on the right level of logging. Example logs entries: vp0_1 | 21:00:05.684 [peer] ensureConnected -> DEBU 3a2 Connected to: [] vp0_1 | 21:00:05.684 [peer] ensureConnected -> DEBU 3a3 Discovery knows about: []

silliman
2016-12-22 21:04
@mike_dircz ok I'm testing a couple theories too but won't bore you with the details just yet in case I've gone off the rails

kenzhang
2016-12-22 21:54
looks like the docker-compose-*.yml files are not working any more due to change introduced by FAB-1241. `ORDERER_GENERAL_BATCHSIZE=10` should be changed to `ORDERER_GENERAL_BATCHSIZE_MAXMESSAGECOUNT=10`

kenzhang
2016-12-22 21:54
other wise launching the orderer and peer containers won't work

kenzhang
2016-12-22 21:54
am I the only one having the problem or am I missing something?

muralisr
2016-12-22 22:14
@kenzhang I think you are right

muralisr
2016-12-22 22:14
just checked the diff and `ORDERER_GENERAL_BATCHSIZE_MAXMESSAGECOUNT=10` should the right right one

muralisr
2016-12-22 22:15
does it work when you make that change ?

muralisr
2016-12-22 22:15
if so I’d suggest opening a JIRA for the issue and submitting a fix please ?

zainx01
2016-12-22 22:38
hi, i'm getting a grpc timeout when i try to discover my rootnode with a validating peer.

zainx01
2016-12-22 22:40

zainx01
2016-12-22 22:40
help please

muralisr
2016-12-22 22:50
@zainx01 its been a while since I worked with 0.6 or 0.7 …. but let me try

muralisr
2016-12-22 22:51
what’s your configuration.. you are runninng the validating peer in docker ?

muralisr
2016-12-22 22:51
where is the above screen shot from ?

shakespeare
2016-12-23 03:38
Hello, everyone. I pay close attention to the progress of fabric project, and also use fabric in our blockchain project.

shakespeare
2016-12-23 03:38
These days, I found there is a new feature in fabric v1.0. It is Hyperledger Ordering Service

shakespeare
2016-12-23 03:39
However, I don't know what ordering service is. I feel difficult to understand orderer or ordering service clearly

shakespeare
2016-12-23 03:39
Anybody can explain it for me with simple words which are easy to understand.

shakespeare
2016-12-23 03:40
Besides, I also wanna know why this feature is added? what problem is this feature used to solve?

shakespeare
2016-12-23 03:40
Thanks a lot in advance.

milkeg
2016-12-23 06:17
has joined #fabric

yacovm
2016-12-23 07:13
It's like a consensus service

yacovm
2016-12-23 07:14
It creates total order of transactions in a block

zainx01
2016-12-23 08:17
@muralisr this was from an ubuntu vm i'm running on my machine. I managed to resolve it, but thanks :slightly_smiling_face:. Wasn't properly setting up the environment variables

shakespeare
2016-12-23 08:46
@yacovm Your reply is for my question?

yacovm
2016-12-23 09:02
yes

jonathanlevi
2016-12-23 09:18
@shakespeare: keep in mind that many people are on holidays these days… but I can provide a few pointers. This is from @binhn ’s presentation (that’s about a few months old, but I think it gives a very nice overview)

jonathanlevi
2016-12-23 09:18


jonathanlevi
2016-12-23 09:21
Another good resource (which includes these) which in my view is currently one of the *best* JIRA item in Fabric, is to @markparz ’s (famous) *Consensus endorsing, consenting, and committing model* that has more pointers and docs: https://jira.hyperledger.org/browse/FAB-37

jonathanlevi
2016-12-23 09:22
Most of the “new stuff” in Fabric v1, is in the “Fabric Next” family of docs/references.

jonathanlevi
2016-12-23 09:23
Hope this helps ^^^ @shakespeare

shakespeare
2016-12-23 09:24
@jonathanlevi Thanks so much, great helps to me. I'm reading source codes and documents about orderer. Your guide is really helpful to me.

shakespeare
2016-12-23 09:47
@jonathanlevi, by the way, that document you offered mentioned "none deterministic transaction". Can you explain what it is? Thanks a million.

shakespeare
2016-12-23 10:02
@jonathanlevi, that document mentions another document called "https://github.com/hyperledger/fabric/wiki/Next-Consensus-Architecture-Proposal",but what a pity, it is not available. It doesn't work. Where can I get this architecture proposal? Thanks a lot


jonathanlevi
2016-12-23 10:06
(*hyperledger* moved to *hyperledger-archives* since) we should update that doc!

shakespeare
2016-12-23 10:24
@jonathanlevi, ok, thanks

mind7think
2016-12-23 10:45
has joined #fabric

benlewis
2016-12-23 11:08
I'm trying to run IBM's car lease demo on my local machine with docker, however the deployment fails with the following error: Error starting container: Tag latest not found in repository http://docker.io/hyperledger/fabric-baseimage

garisingh
2016-12-23 12:42
@benlewis - the problem is that there is no latest tag for fabric-baseimage - so you either need to pull down the image using the proper platform tag or you can simply retag the fabric-peer image : `docker tag hyperledger/fabric-peer:latest hyperledger/fabric-baseimage:latest`

benlewis
2016-12-23 12:44
@garisingh thanks

kenzhang
2016-12-23 13:20
@muralisr I was able to run all of the unit tests successfully. I've submitted a fix. https://gerrit.hyperledger.org/r/#/c/3493/

kenzhang
2016-12-23 13:21
do I need to open a new JIRA defect or we can reuse FAB-1241?

mbradaschia
2016-12-23 13:24
has joined #fabric

kenzhang
2016-12-23 13:37
I was able to run all of the unit tests successfully. I've submitted a fix. https://gerrit.hyperledger.org/r/#/c/3493/ do I need to open a new JIRA defect or we can reuse FAB-1241?

muralisr
2016-12-23 14:38
@kenzhang typically this would come under the category of a “bug” fix but I suppose in this case tagging FAB-1241 is enough

muralisr
2016-12-23 14:38
thanks!

sbrakev
2016-12-23 15:15
General question: If I had a business case that required an object, say a Car, to be stored on the blockchain and access to certain properties of that car restricted to certain roles, can I do that in 0.6 and is there an example that demonstrates this feature? For example, the car has “Make, Model, and Year” but only the manufacturer and owner can see all three, an auctioneer can only see Make, and Model.

mike_dircz
2016-12-23 18:12
Hi @silliman, after deploy I too have the same log messages: 12:07:35.583 [shim] DEBU : [mycc]Received message INIT from shim 12:07:35.583 [shim] DEBU : [mycc]Handling ChaincodeMessage of type: INIT(state:established) 12:07:35.583 [shim] DEBU : Entered state init 12:07:35.583 [shim] DEBU : [mycc]Received INIT, initializing chaincode Aval = 100, Bval = 200

mike_dircz
2016-12-23 18:20
Hi @silliman, after Invoke the log messages show it was successful as well: 12:17:08.958 [shim] DEBU : [cb321457]Received RESPONSE, communicated (state:transaction) 12:17:08.958 [shim] DEBU : [cb321457]GetState received payload RESPONSE Aval = 90, Bval = 210

mike_dircz
2016-12-23 18:21
@silliman, has to be something wonky with the Query command.

silliman
2016-12-23 18:27
@mike_dircz Hi Mike, if you're up for it, I can help you debug via direct message and then we can post the resolution here

mike_dircz
2016-12-23 18:30
@silliman absolutely would appreciate the help.

michael.w.klein
2016-12-23 20:29
has joined #fabric

janaka-steph
2016-12-23 21:23
has joined #fabric

shakespeare
2016-12-24 00:58
"The architecture separates trust assumptions for chaincodes (blockchain applications) from trust assumptions for consensus". Here "trust assumption" mentioned, anybody can explain this concept? Thanks a million.

alanlee
2016-12-24 02:52
Dear, Question: For v1.0, if we want to enable TLS between peer, how do we configure? do we need to use COP or just a peer config? Thank you.

inatatsu
2016-12-24 04:58
A few questions about V1. 1. Can we still invoke a chaincode from another chaincode? 2. Can we simulate a PBFT network equivalent to V0.6? For example, when I want to set up a network which allows 1 failing endorser out of 4 total endorsers, how can I enforce that policy? Should I just select some options for the orderer or do I have to develop a customized Node SDK client?

bobquest33
2016-12-24 07:19
has joined #fabric

ellen
2016-12-24 12:46
has joined #fabric

yuryandreev
2016-12-24 12:47
has joined #fabric

phil_sr
2016-12-24 16:29
has joined #fabric

mikem
2016-12-24 17:25
has joined #fabric

akira
2016-12-24 23:36
has joined #fabric

shakespeare
2016-12-25 23:49
"Connect to the anchor Peers and start discovery protocol using ecert ". Here "anchor peers" is mentioned. How to understand this phrase? Which kind of peers are called "anchor peer? Anybody can explain it for me, thanks.

mauricio
2016-12-26 06:40
has joined #fabric

lightningli
2016-12-26 11:34
has joined #fabric

abhijith
2016-12-26 13:12
has joined #fabric

kfioktistov
2016-12-26 13:20
has joined #fabric

wangjie
2016-12-27 06:20
has joined #fabric

smiley
2016-12-27 11:08
how to create my own membership service?

garisingh
2016-12-27 12:42
@smiley - could you provide a little more detail on what you are trying to accomplish?

smiley
2016-12-27 12:56
@garisingh --I'm trying to edit the membersrvc.yaml and modify my images

goms143
2016-12-27 12:57
has joined #fabric

garisingh
2016-12-27 13:22
are you trying to add new users or change something else?

garisingh
2016-12-27 13:24
modifying / creating your own users should be pretty straightforward. I guess you'll need to decide whether or not you want to add simply add to the existing users (which can be done via environment variable or via the NodeSDK after the fact) or you can modify the yaml itself and then build the image using the appropriate make directive (I forget the exact name but it's in the makefile)

harsha544
2016-12-27 16:44
@garisingh how do we add new users in V1.0 is it via fabric-cop, if so how can we do that?

jonathanlevi
2016-12-27 18:31
Yes, it’s `make membersrvc` (in v0.5, v0.6)

jonathanlevi
2016-12-27 18:32
@harsha544: I have forwarded your question to the #fabric-cop channel.

jonathanlevi
2016-12-27 18:34
(In a line, the simplest is to use the fabric-sdk - the NodeJS version is the most “feature-rich” SDK in Fabric to date… and it allows you to dynamically add users - there is a Register/Enroll step that you can use)

shrike
2016-12-27 23:53
where is the code for membersrvc now? make in fabric repo isn't building it anymore: ``` membersrvc-image: @echo "membersrvc has been removed from this build" ```

harsha544
2016-12-28 03:11
@jonathanlevi: Thank you

ghaskins
2016-12-28 04:29

makimaki18
2016-12-28 14:21
has joined #fabric

benlewis
2016-12-28 15:35
Is there an SDK for events in Fabric v0.6? I can't find any documentation on it if there is

garisingh
2016-12-28 15:49
@benlewis - it's built in to the NodeSDK - definitely in latest hfc (v0.6.5)


garisingh
2016-12-28 15:51
(a sample which uses the event hub API)

benlewis
2016-12-28 15:56
thanks

bianca
2016-12-28 22:18
has joined #fabric

umasuthan
2016-12-29 04:16
has joined #fabric

wenhao
2016-12-29 06:44
has joined #fabric

yongxinq
2016-12-29 08:40
has joined #fabric

garisingh
2016-12-29 10:56
just thought I'd cross post this over to fabric since it is Fabric related

madhava
2016-12-29 11:08
has joined #fabric

umasuthan
2016-12-29 11:39
@garisingh, Thanks so much for the details. The explanations are very helpful

ashishkel
2016-12-29 14:47
@garisingh, so these changes signal a totally revamped fabric architecture. So how are these features going to be released? I mean are they going to be released phase by phase, on the top of 0.6 or 0.7 which we have, all the while maintaining backward compatibility?

ashishkel
2016-12-29 14:49
And thank u @garisingh, for the details.

garisingh
2016-12-29 15:47
@ashishkel - the architecture is not backwards compatible with v0.6 (although you'll only need to make a few minor changes to chaincode developed in v0.6 for it to work with v1.0)

garisingh
2016-12-29 15:48
v0.7 is actually the v1.0 architecture but basically the master branch will continue to evolve to the final v1.0 architecture. most of the interfaces are pretty solid right now

ashishkel
2016-12-29 16:49
@garisingh Okay, That's okay, minor changes are always okay.

zainx01
2016-12-29 20:30
@zainx01 uploaded a file: https://hyperledgerproject.slack.com/files/zainx01/F3K49R681/capture.png and commented: hi, i'm having some trouble installing the hfc kit. I get this error. The command is npm install hfc@0.6.5. Does anyone know about this?

muralisr
2016-12-29 20:59
@zainx01 I had some problems till i had the latest node… not sure if you are running into the same thing but I’d certainly uninstalling node and npm and get the latest … also do try fabric-sdk-node-dev

garisingh
2016-12-29 21:08
@zainx01 - what is your host operating system?

serinth
2016-12-29 22:13
has joined #fabric

dsanchezseco
2016-12-29 23:06
has joined #fabric

abhinav.garg
2016-12-30 04:11
has joined #fabric

abhinav.garg
2016-12-30 04:11
Hi, I saw sample on youtube relates with Hyperledger for art auction. I want to deploy to my local machine.Please provide me a proper installation guide for it. I tried github sample but i am much confused related what additional softwares like vagrant,node .js installation for ubuntu. please took a king consideration.

akong
2016-12-30 07:58
has joined #fabric

benlewis
2016-12-30 10:53
With the events SDK, would I be correct in thinking it just publishes to an event stream when called from chaincode?

muralisr
2016-12-30 14:34
@benlewis yes, events is sent on a grpc stream @pmullaney will have more details on the SDK implementation for events

benlewis
2016-12-30 14:35
@muralisr thanks

muralisr
2016-12-30 14:35
sure thing

benlewis
2016-12-30 14:38
@muralisr Do you know if each validating peer hosts the grpc event stream?

muralisr
2016-12-30 14:41
@benlewis yes, each peer would. are you talking about the master or 0.6/0.7 fabric ?

benlewis
2016-12-30 14:41
I'm using the v0.6 at the moment

muralisr
2016-12-30 14:42
there is no events support in the SDK - I thought - on 0.6/0.7 .

muralisr
2016-12-30 14:42
or perhaps I am wrong ?

benlewis
2016-12-30 14:43
It's documented under the examples on the v0.6 branch

muralisr
2016-12-30 14:43
ok

benlewis
2016-12-30 14:44
Thanks for your help though, it should mean I can make use of the block listener

muralisr
2016-12-30 14:44
its been a while since I used 0.6. Let me double check

muralisr
2016-12-30 14:45
support is there in 0.6 SDK (how quickly one forgets!) … sorry about that @benlewis

benlewis
2016-12-30 14:46
don't worry, I know 0.6 is old by now but I'm aiming for stable for prototypes and demos. Thank you though for your help

muralisr
2016-12-30 14:47
yw

ghaskins
2016-12-30 14:52
@muralisr @benlewis I can confirm that v0.6 SDK supports at least basic events (e.g. deploy/invoke completion)

ghaskins
2016-12-30 14:52
not sure about chaincode events

ghaskins
2016-12-30 14:53
I was using nodesdk v0.6.5 and fabric v0.6.1-preview and they worked fine

muralisr
2016-12-30 14:53
thanks @ghaskins … I think I was conflating with chaincode events

ghaskins
2016-12-30 14:54
@muralisr thats understandable...those are the more interesting ones :wink:

muralisr
2016-12-30 14:54
indeed :slightly_smiling_face:

ghaskins
2016-12-30 14:54
though actually having the txn complete events is critical too, so it was a welcome addition

benlewis
2016-12-30 14:55
Chaincode events are the ones I'm looking for ideally but I can always build v1.0 if needed

ghaskins
2016-12-30 14:55
@benlewis best to ask @pmullaney...it could very well have chaincode events in v0.6, I am not sure

benlewis
2016-12-30 14:56
It at least compiles, which is a good sign

rafael.turk
2016-12-30 15:07
Hi All. How can I query multiple items? For example get a list of all `users` that belong to bank B? This means all user that have `bank` set to *B* ?

muralisr
2016-12-30 15:14
@rafael.turk given there’s no rich query capability like SQL, you have to either get the list and iterate or maintain a mapping from bank to users

muralisr
2016-12-30 15:15
I’d check in fabric-ledger or fabric-ledger-dev for plans for query capabilities (especially with couchdb support) in 1.0

benlewis
2016-12-30 15:28
I'm trying to make the peer on 16.04 and I get a path error for rocksdb.c

benlewis
2016-12-30 15:28
Making it on 16.04

benlewis
2016-12-30 15:28
Ubuntu*

rafael.turk
2016-12-30 15:31
@muralisr so what’s the fastest/more efficient way to get a list?

rafael.turk
2016-12-30 15:33
Meaning.. in a array or even array of ids..

muralisr
2016-12-30 15:37
it depends so much on the use case (will there be more updates or just reads, how many items in the bank->users map, etc)

ghaskins
2016-12-30 15:55
@benlewis I assume you are trying to build v0.6?

benlewis
2016-12-30 15:55
@ghaskins Yes I am

ghaskins
2016-12-30 15:55
the only supported method of building in v0.6 is via vagrant

ghaskins
2016-12-30 15:56
cd devenv && vagrant up

ghaskins
2016-12-30 15:56
that would get you an environment that has all the prerequisites for building

ghaskins
2016-12-30 15:56
that said, if you want to, you can replicate the setup on your own

benlewis
2016-12-30 15:57
ah okay, thanks

ghaskins
2016-12-30 15:57
in v0.6, theres two parts: the baseimage and devenv

ghaskins
2016-12-30 15:57
baseimage scripts are in ./images/base (IIRC)

ghaskins
2016-12-30 15:57
and devenv is in ./devenv

benlewis
2016-12-30 15:58
I do have the vagrant devenv set up, I was just trying to be lazy with testing and it didn't work

ghaskins
2016-12-30 15:58
in there, you would see the recipe for building librocksdb.so that you are missing

ghaskins
2016-12-30 15:58
ok, cool, thats the easiest path

ghaskins
2016-12-30 15:58
in master/mainline, the requirements are greatly relaxed such that you can build from most places

ghaskins
2016-12-30 15:59
but v0.6 still has the old setup

benlewis
2016-12-30 15:59
That'll be where I was getting confused, I was assuming the references to building locally would also count for v0.6 which they don't

ghaskins
2016-12-30 16:01
ah, gotcha

sibelius
2016-12-30 16:11
has joined #fabric

benlewis
2016-12-30 16:58
When running the events client, I'm getting "could not start chat rpc error: code = 12 desc = unknown service protos.Events"

benlewis
2016-12-30 16:59
Any idea? This is from the fabric examples

garisingh
2016-12-30 18:23
is the event server actually listening?

garisingh
2016-12-30 18:23
it does run on a different port

joseph
2016-12-30 18:32
Hi,

joseph
2016-12-30 18:33
I run 'go test' for the example 'asset_management02'.

joseph
2016-12-30 18:33
I got this error

joseph
2016-12-30 18:34

joseph
2016-12-30 18:35
Could you please give an idea about it?

garisingh
2016-12-30 19:40
@joseph - are you trying to run this against the master branch?

twigwam
2016-12-31 02:14
has joined #fabric

karnn
2016-12-31 09:57
I'm having trouble building fabric:


2016-12-31 10:22
@garisingh commented on @karnn’s file https://hyperledgerproject.slack.com/files/karnn/F3L3B2K7V/problems_building_fabric.txt: looks like you have some type of network / DNS error. Within Vagrant, what happens if you do `ping http://index.docker.io`?

karnn
2016-12-31 10:24
@garisingh i get the following: ping: unknown host http://index.docker.io

garisingh
2016-12-31 10:25
what about on your host OS outside of Vagrant?

karnn
2016-12-31 10:27

karnn
2016-12-31 10:28
@garisingh is this a problem with vagrant's port forwarding or with the dns server i'm connected to?

garisingh
2016-12-31 10:30
hmm - well looks like your host is connecting just fine so that's good news. Unfortunately I am not an expert on Vagrant so not sure why DNS resolution is not working correctly

karnn
2016-12-31 10:33
@garisingh should i just destroy and up again?

karnn
2016-12-31 10:34
@garisingh also quick question, the repo i clone from gerrit is the latest build right? the 0.6 release is something i need to clone manually right/

garisingh
2016-12-31 10:35
I'd go with the destroy approach. And yes - by default you would clone the master branch which is the current working branch for the next release(s)

garisingh
2016-12-31 10:36
BTW - if you are working off the master branch, you don't actually need to use Vagrant anymore. You just need to have Docker installed locally on your host system

garisingh
2016-12-31 10:37
For example, I use OSX and I run everything within OSX and don't use Vagrant at all

karnn
2016-12-31 10:39
@garisingh i use rhel7.2. so i need to have docker and follow the same docs?

garisingh
2016-12-31 10:42
right

karnn
2016-12-31 11:37
@garisingh quick question. is there a problem if i build "sudo make dist-clean all" in in the '/src/github.com/hyperledger/fabric' folder. or should i make a new docker group and add user to that group so that i can connect to docker.

karnn
2016-12-31 11:54
@garisingh nvm, i'll just make a docker group to be safe

garisingh
2016-12-31 12:18
I go with the docker group

karthikimg
2017-01-02 14:10
has joined #fabric

simers
2017-01-03 03:01
has joined #fabric

jayphillips
2017-01-03 05:44
has joined #fabric

ypqu
2017-01-03 06:17
hi, I got error when i want to build peer docker image , I search it in google ,but nobody get same error ,i have no idea where is wrong, could you please help to check it ~


ypqu
2017-01-03 06:20
it works fine in Centos7

ypqu
2017-01-03 07:46
i change the [ADD] to [COPY] in step3, and add unzip command in [RUN] . it works well.

karthik
2017-01-03 08:02
Hello everyone. I am facing some issues with "Writing, Building, and Running Chaincode in a Development Environment". I am using a Ubuntu 14.04 LTS system, followed the steps given under without vagrant (docker images).

karthik
2017-01-03 08:02
When I try to deploy the chaincode using "peer chaincode deploy -n mycc -c '{"Args": ["init", "a","100", "b", "200"]}'"

karthik
2017-01-03 08:02
I am getting a "peer command not found" error.

ashishkel
2017-01-03 08:22
@karthik If you are using docker images, then you have to login to the bash shell of running docker instance and then execute those commands.

karthik
2017-01-03 08:29
@ashishkel So the chaincode registration step also needs to be inside docker right?

ashishkel
2017-01-03 08:30
The peer executable is available only inside the docker's bash shell. So yes.

ashishkel
2017-01-03 08:33
@karthik You have to build the Chaincode executable inside the docker I guess. Because the go environment, outside the docker, i.e, present in the host OS and the one present inside the docker might be different.

karthik
2017-01-03 08:34
@ashishkel Thanks for the help. I will try this and get back to you.

ashishkel
2017-01-03 08:34
@karthik happy to help.

iggyig
2017-01-03 21:51
has joined #fabric

tzipih
2017-01-04 04:24
has joined #fabric

rguy88
2017-01-04 04:28
has joined #fabric

subaru365
2017-01-04 08:48
has joined #fabric

benlewis
2017-01-04 09:17
when launching chaincode, what's the path that it expects? I'm using the vagrant devenv on v0.6 to try and launch one of the examples

benlewis
2017-01-04 09:17
is the path absolute, or is it relative to something?

thojest
2017-01-04 09:27
@benlewis you mean when deploying?

benlewis
2017-01-04 09:28
@thojest yes

thojest
2017-01-04 09:36
@benlewis i think you have to deploy relative to your gopath if i remember correctly

thojest
2017-01-04 09:37
you can find out with `echo $GOPATH`

benlewis
2017-01-04 09:41
@thojest Thanks :slightly_smiling_face:

elisabetta
2017-01-04 10:12
has joined #fabric

didierphmartin
2017-01-04 13:20
has joined #fabric

rahulhegde
2017-01-04 13:26
has joined #fabric

rahulhegde
2017-01-04 13:26
using v1.0 architecture, I am having problem to deploy a custom 'learn-chaincode' using CLI Step followed" 1. Run peer node (used the connenct-a-thon peer image) in the DEV ('peer node start --peer-chaincodedev'). 2. Use CLI to deploy the chaincode ' peer chaincode deploy -n mycc -c '{"Function": "init", "Args": ["100K"]}' -p https://github.com/rahulhegde/learn-chaincode/start' I can see 'go get' successful performed on '-p' however i receive following log trace on peer '12:39:26.774 [golang/hash] getCodeFromHTTP -> DEBU 010 getCodeFromHTTP http://github.com/rahulhegde/learn-chaincode/start 12:39:26.774 [golang/hash] getCodeFromHTTP -> DEBU 011 go get http://github.com/rahulhegde/learn-chaincode/start 12:39:34.962 [golang/hash] hashFilesInDir -> DEBU 012 hashFiles /opt/gopath/_usercode_/963812584/src/github.com/rahulhegde/learn-chaincode/start 12:39:35.920 [container] WriteGopathSrc -> INFO 013 rootDirectory = /opt/gopath/src 12:39:35.920 [container] WriteFolderToTarPackage -> INFO 014 rootDirectory = /opt/gopath/src 12:39:35.922 [msp] GetManager -> INFO 015 Returning MSP manager %!p(msp.peerMspManagerImpl={map[DEFAULT:0xc4201dc600] PeerMSPManager true}) 12:39:35.922 [msp] GetSigningIdentity -> INFO 016 Looking up MSP with ID {DEFAULT} 12:39:35.922 [msp] GetSigningIdentity -> INFO 017 Obtaining signing identity for &{{DEFAULT} PEER} 12:39:35.929 [msp] Sign -> INFO 018 Signing message Error: Error endorsing chaincode: rpc error: code = 2 desc = Failed to init chaincode(handler not found for chaincode mycc)'

asalem
2017-01-04 13:34
has joined #fabric

asalem
2017-01-04 13:34
hi everyone!

garisingh
2017-01-04 13:55
hello!

vanio
2017-01-04 13:57
has joined #fabric

benlewis
2017-01-04 14:06
When using the Rows and tables in v0.6, is there a way of updating a columns value?

ghaskins
2017-01-04 14:08

nickmelis
2017-01-04 14:39
apologies if this has been answered already, does Hyperledger generate a new block for every transaction?

tuand
2017-01-04 14:44
the number of Tx in a block is controlled via the batchsize and batchtimeout configuration values

mwes
2017-01-04 14:48
has joined #fabric

thojest
2017-01-04 14:55

thojest
2017-01-04 14:56
it seems that everything works but please can someone tell me how i can now call the functions defined in app.js

nickmelis
2017-01-04 14:56
thanks @tuand as far as I can see a new block will be produced when either you hit the transaction limit or the timeout

nickmelis
2017-01-04 14:57
do empty blocks get generated? (I have a sense the answer is no, but want to be sure)

thomas_domingos
2017-01-04 14:57
has joined #fabric

thojest
2017-01-04 14:59
and pleas someone can tell me what `DEPLOY_MODE=dev node app` does

tuand
2017-01-04 15:02
@nickmelis yes, correct on size/timeout ... empty blocks are not generated

muralisr
2017-01-04 15:34
@rahulhegde remote chaincode dowload using ` -p https://github.com/rahulhegde/learn-chaincode/start` is incompatible with `—peer-chaincodedev` mode

muralisr
2017-01-04 15:34
`—peer-chaincodedev` is meant for local dev/testing for faster turnaround with chaincode development

muralisr
2017-01-04 15:35
with it a developer starts the chaincode directly (instead of having the chaincode start it)

muralisr
2017-01-04 15:35
you don’t have to deploy the chaincode at all with -p option

muralisr
2017-01-04 15:36
let me get you the steps to do development in —peer-chaincode mode in 1.0

muralisr
2017-01-04 15:40
it was in one of the channels a while back..

yangtao76
2017-01-04 15:42
has joined #fabric

praveencls
2017-01-04 15:42
has joined #fabric

yangtao76
2017-01-04 15:50
hello

benlewis
2017-01-04 15:59
Is there a version of the node sdk specifically for v0.6 or should it just work with the current one'?

thojest
2017-01-04 16:07
@benlewis seems that we are roughly at the same point. do you maybe have some input for my question?

benlewis
2017-01-04 16:07
@thojest

benlewis
2017-01-04 16:07
My plan is to try and use the web-app.js

benlewis
2017-01-04 16:07
I've never really used node before so I'm flying blind and praying

thojest
2017-01-04 16:08
nice im trying this too but started with app.js

thojest
2017-01-04 16:08
@benlewis same here

thojest
2017-01-04 16:09
so if u make any progress let me know :slightly_smiling_face:

benlewis
2017-01-04 16:09
Will do, I'm currently having issues building the SDK in the vagrant environment

thojest
2017-01-04 16:09
my main question is how one can call functions of the chaincode using the hfc api

thojest
2017-01-04 16:10
@benlewis ahh ok i built hyperledger v0.6 locally on a bare-metal ubuntu system

thojest
2017-01-04 16:10
seems that the 3 days of despair are paying out now because i dont have to use vagrant

benlewis
2017-01-04 16:11
I tried doing that and wasn't making progress. I can get everything else running with no issues in Vagrant. My chaincode is now working and ready, it just needs a front-end

benlewis
2017-01-04 16:11
how did you install the hfc module?

thojest
2017-01-04 16:11
yeah same here. very simple chaincode ready but want to develop a front end

thojest
2017-01-04 16:12
just using `npm install hfc` i think

benlewis
2017-01-04 16:13
I get the error that it can't find hfc annoyingly

thojest
2017-01-04 16:13
have you tried updatin npm ?

thojest
2017-01-04 16:14
when i do `npm -v`

thojest
2017-01-04 16:14
it tells me im using version 4.0.5

benlewis
2017-01-04 16:14
2.11.3 which might be my issue

benlewis
2017-01-04 16:15
I'm going to make sure everything is up to date and try after that

thojest
2017-01-04 16:15
good luck on that :slightly_smiling_face:

benlewis
2017-01-04 16:15
thanks :slightly_smiling_face: let me know if you make any progress

thojest
2017-01-04 16:16
what might be helpful. i am quite new to programming webpages especially using nodejs.

thojest
2017-01-04 16:16

thojest
2017-01-04 16:16
giving me a general idea how it works

benlewis
2017-01-04 16:16
Thanks, that does look useful

muralisr
2017-01-04 16:25
@rahulhegde here are the instructions to run `—peer-chaincodedev` mode in 1.0

muralisr
2017-01-04 16:25
```Will use the CLI/Vagrant env for these steps to run in --peer-chaincodedev mode in 1.0 Vagrant window 1 - build peer make peer Vagrant window 2 - start orderer cd orderer go build ./orderer Vagrant window 2 - start peer in dev mode cd peer peer node start --peer-chaincodedev Vagrant window 3 - start chaincode example02 in dev mode cd examples/chaincode/go/chaincode_example02 go build CORE_PEER_ADDRESS=127.0.0.1:7051 CORE_CHAINCODE_ID_NAME=mycc ./chaincode_example02 Vagrant window 4 - initialize the chaincode using the "deploy" command cd peer CORE_CHAINCODE_MODE=dev peer chaincode deploy -n mycc -c '{"Args":["init","a","100","b","200"]}' CORE_CHAINCODE_MODE=dev is needed in 1.0 with chaincode deploy. Unlike 0.6/0.7, 1.0 builds the chaincode in the deploy command. CORE_CHAINCODE_MODE=dev is needed to tell the deploy command not to skip build related activities #wait for about 10seconds #kill Ctrl-C chaincode_example02 and start chaincode_example02 again in Vagrant window 3. #This is needed - for now - as the fabric deregisters the chaincode after deploy Vagrant window 3 - restart chaincode Ctrl-C running chaincode CORE_PEER_ADDRESS=127.0.0.1:7051 CORE_CHAINCODE_ID_NAME=mycc ./chaincode_example02 #now you can send invokes and queries as usual from window 4 Vagrant window 4 - send an invoke cd peer CORE_CHAINCODE_MODE=dev peer chaincode invoke -n mycc -c '{"Args":["invoke","a","b","10"]}’```

thojest
2017-01-04 16:27
following this tutorial http://fabric-sdk-node.readthedocs.io/en/latest/sample-standalone-app/ in the last step when entering

thojest
2017-01-04 16:27
` CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:7051 MEMBERSRVC_ADDRESS=0.0.0.0:7054 DEPLOY_MODE=dev node app`

nickmelis
2017-01-04 16:28
is it possible to use the Java SDK to listen for events?

thojest
2017-01-04 16:28
the peer node tells me `grpc: Server.Serve failed to create ServerTransport: connection error: desc=....`

benlewis
2017-01-04 16:31
@nickmelis I believe it just sends events over gRPC so you could write a client to listen for them anyway

benlewis
2017-01-04 16:31
@thojest Are you connecting to the correct address for the core peer?

benlewis
2017-01-04 16:32
Btw, I fixed the issues running node, upgrading and fixing the path fixed it

thojest
2017-01-04 16:33
@benlewis nice to hear

nickmelis
2017-01-04 16:41
What does the Java SDK support at the moment? Members creation? Chaincode creation/invocation?

benlewis
2017-01-04 16:42
https://github.com/hyperledger/fabric-sdk-java this gives some indication, but I've personally stuck to using golang and node as they're the best documented

thojest
2017-01-04 16:43
@benlewis @nickmelis thats exactly the reason why i prefered go over java. just because of documentation although i have never written a piece of golang

benlewis
2017-01-04 16:45
I've found golang is fairly straightforward, and with documentation and Google, I've not had too many difficulties

thojest
2017-01-04 16:46
@benlewis same here, especially together with the chaincode examples

cbf
2017-01-04 16:46
@thojest which version are you running? v0.6 images or from master?

thojest
2017-01-04 16:46
v0.6

cbf
2017-01-04 16:47
suggest you use the v0.6 documentation http://hyperledger-fabric.readthedocs.io/en/v0.6/ that should match the published images, where the 'latest' docs may be updated for some of the recent changes to the code that might be incompatible

nickmelis
2017-01-04 16:49
@thojest yes in fact I can see very little documentation on the Java SDK. But is it actively being developed?

thojest
2017-01-04 16:50
@nickmelis dunno you have to ask that to someone whos contributing :smile:

thojest
2017-01-04 16:50
im just getting started

benlewis
2017-01-04 16:51
@nickmelis As far as I'm aware, there is a Java and Python SDK in active development, but my best guess is that Golang gets the most attention as the rest of the code is also in Go. The NodeSDK was the first and is the most prominent one

benlewis
2017-01-04 16:51
You could also use the REST API but they've removed that in v1.0 as far as I know

thojest
2017-01-04 16:51
@cbf im basically following this instruction but i built v0.6 myself on baremetal ubuntu so maybe there is some configuration problem because i did it myself

nickmelis
2017-01-04 16:52
so what’s the best way to interact with the fabric from Java?

benlewis
2017-01-04 16:53
Are you using v0.6 or v1.0?

nickmelis
2017-01-04 16:53
0.6, but it doesn’t really make sense to start using REST API if they’re going to be removed in 1.0

cbf
2017-01-04 16:54
@thojest I see

cbf
2017-01-04 16:54
is there a reason that you need to run this bare metal?

cbf
2017-01-04 16:55
@nickmelis the Java SDK can work with v0.6 though I think that if you want to explore with java chaincode that you may need a patch

cbf
2017-01-04 16:57
@thojest I shouldn't think there would be a problem building it yourself

cbf
2017-01-04 16:57
@garisingh has built it natively on ubuntu (and basically all the platforms) so you might ping him if there are any gotchas

nickmelis
2017-01-04 17:00
@cbf is it preferrable to work with Java SDK and v1.0? Is that what you’re saying?

nickmelis
2017-01-04 17:00
I looked at HyperLedger a few months ago and am not really up to date with the latest developments

thojest
2017-01-04 17:03
@cbf somebody told me that avoiding vagrant offers some benefits. and indeed until now everything worked very nicely

thojest
2017-01-04 17:05
@cbf @garisingh so the complete error message i get is`2017/01/04 17:59:54 transport: http2Server.HandleStreams failed to receive the preface from client: read tcp 127.0.0.1:7051->127.0.0.1:55672: read: connection reset by peer 2017/01/04 18:00:04 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 127.0.0.1:7051->127.0.0.1:55676: write: broken pipe" 2017/01/04 18:00:14 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 127.0.0.1:7051->127.0.0.1:55678: write: broken pipe"`

thojest
2017-01-04 17:06
´2017/01/04 17:59:54 transport: http2Server.HandleStreams failed to receive the preface from client: read tcp 127.0.0.1:7051->127.0.0.1:55672: read: connection reset by peer 2017/01/04 18:00:04 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 127.0.0.1:7051->127.0.0.1:55676: write: broken pipe" 2017/01/04 18:00:14 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 127.0.0.1:7051->127.0.0.1:55678: write: broken pipe"´

thojest
2017-01-04 17:06
sry for doublepost

shsedghi
2017-01-04 17:06
I am playing with Java SDK and I can deploy and invoke in Dev mode well. However in query I get : Error starting Simple chaincode: Error handling message: [mycc]Chaincode handler FSM cannot handle message (ERROR) with payload size (18) while in state: ready11:49:50.995 [shim] DEBU : [mycc]Received message QUERY from shim Chain code also gets: 11:49:50.995 [shim] DEBU : [mycc]Received message ERROR from shim 11:49:50.995 [shim] DEBU : [mycc]Handling ChaincodeMessage of type: ERROR(state:ready) and breaks

rahulhegde
2017-01-04 17:07
thanks @muralisr. I will try the steps provided to run the chaincode in developer mode on v1.0. however when tried w/o the developer mode, I received following exception ``` 12:49:38.080 [golang/hash] getCodeFromHTTP -> DEBU 010 getCodeFromHTTP http://github.com/rahulhegde/learn-chaincode/start 12:49:38.080 [golang/hash] getCodeFromHTTP -> DEBU 011 go get http://github.com/rahulhegde/learn-chaincode/start 12:49:46.591 [golang/hash] hashFilesInDir -> DEBU 012 hashFiles /opt/gopath/_usercode_/011513129/src/github.com/rahulhegde/learn-chaincode/start 12:49:47.546 [container] WriteGopathSrc -> INFO 013 rootDirectory = /opt/gopath/src 12:49:47.546 [container] WriteFolderToTarPackage -> INFO 014 rootDirectory = /opt/gopath/src panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x89f694] goroutine 1 [running]: panic(0xa83500, 0xc420016070) /opt/go/src/runtime/panic.go:500 +0x1a1 http://github.com/hyperledger/fabric/core/container/util.WriteFolderToTarPackage.func1(0xc4210892f0, 0xf, 0x0, 0x0, 0x109ec20, 0xc4210754d0, 0xc421075401, 0xc4210754a0) /opt/gopath/src/github.com/hyperledger/fabric/core/container/util/writer.go:65 +0xa4 path/filepath.Walk(0xc4210892f0, 0xf, 0xc4210754a0, 0xb41d07, 0x1) /opt/go/src/path/filepath/path.go:396 +0x8b ```

thojest
2017-01-04 17:25
is it possible that ubuntu 16.04 does not support http2 ?

cbf
2017-01-04 17:25
@thojest vagrant is not needed... just Docker

cbf
2017-01-04 17:25
see the Starter Kit


cbf
2017-01-04 17:26
that's the fastest and most reliable way to get rolling

thojest
2017-01-04 17:27
@cbf thx a lot but except from the hfc sdk api everything works fine. and i would be very unhappy to change my setup now after 2 weeks of work

muralisr
2017-01-04 17:31
@rahulhegde I’ll try remote sometime today

thojest
2017-01-04 18:03
@cbf this seems to be exactly my problem


cbf
2017-01-04 18:44
hmmm

cbf
2017-01-04 18:45
@jzhang ^^ maybe you can help @thojest

cbf
2017-01-04 18:46
fab-321 is closed and was verified as fixed with hfc@0.61

nickmelis
2017-01-04 18:57
am I right in thinking JSON API are going to be removed with 1.0 release?


sibelius
2017-01-04 19:04
I have the following error while building my chaincode

fbenhamo
2017-01-04 19:10
has joined #fabric

sibelius
2017-01-04 19:10

jzhang
2017-01-04 19:18
@thojest if you are seeing the problem logged in FAB-321 (number of arguments does not match what the chaincode expected), you should update hfc to v0.6.1 or later (might as well get the latest v0.6.5) and try again

jzhang
2017-01-04 19:19
also on your question above regarding java SDK, it’s being worked on by @pvishnum @rickr @maltaf and is targeting a March “release" along with the node.js SDK for fabric v1.0

jzhang
2017-01-04 19:22
@nickmelis JSON RPC APIs (some call it REST) are removed from the Peer nodes. but the node SDK team is working on adding it to the SDK. I hope the Java SDK will also have that. https://jira.hyperledger.org/browse/FAB-156

sibelius
2017-01-04 19:29
`brew install rocksdb` solved my problem

mbrichman
2017-01-04 19:53
has joined #fabric

jaysa
2017-01-04 20:36
has joined #fabric

nandini.parimi
2017-01-04 20:42
has joined #fabric

xhe
2017-01-04 21:16
has joined #fabric

xhe
2017-01-04 21:16
Hi team, We already setup two peers. Is there a easy way to manually verify that the two peers are in a workable state?

xhe
2017-01-04 21:16
:slightly_smiling_face:

nickmelis
2017-01-04 21:19
@jzhang does it mean I may end up not having the REST API anymore and not having any way to interact with the chaincode in the Java SDK too?

jzhang
2017-01-04 21:35
@nickmelis with java sdk you can always use its APIs to interact with the chaincode (which communicates via grpc under the cover), and if the Java SDK team do not deliver the JSON RPC wrapper, then you can always use the node.js SDK to achieve that. delivering the JSON RPC wrapper is a high priority item for the node.js SDK team and @anya has been working on that

anya
2017-01-04 21:35
has joined #fabric

nickmelis
2017-01-04 21:36
ok I see…so I still have a way to interact with the chaincode using Java SDK. Has it been tested with v1.0 too?

nickmelis
2017-01-04 21:36
also I guess if I use the node SDK it will expose the rest APIs which I can then use from my Java app, right?

jzhang
2017-01-04 21:46
yes and yes :wink:

nickmelis
2017-01-04 22:20
with HyperLedger, do I need to sign transactions before sending them to the ledger (Ethereum style)?

ziyuan
2017-01-04 22:57
has joined #fabric

sk
2017-01-05 01:28
has joined #fabric

yangtao76
2017-01-05 04:18
peer node start error:

yangtao76
2017-01-05 04:19

abhinav.garg
2017-01-05 05:30
can someone help me for setting hyperledger on my ubuntu

abhinav.garg
2017-01-05 05:30
on by remote

sachinsurvase
2017-01-05 05:31
@abhinav.garg What you are looking for .... just dev setup right?

abhinav.garg
2017-01-05 05:33
yeah

abhinav.garg
2017-01-05 05:34
on any platform either windows too

abhinav.garg
2017-01-05 05:34
i want to deploy a simple project on hyperledger locally onj machine

sachinsurvase
2017-01-05 05:37
http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Chaincode-setup/ .... guide is self explanatory ... using docker & docker-compose

abhinav.garg
2017-01-05 05:39
Thanks

manojsherkhane
2017-01-05 05:41
has joined #fabric

ibmamnt
2017-01-05 06:03
Is there any example of docker compose file which has 1. COP docker image with either MySQL or PostgreSQL setup 2. Endorser (peer) and Orders (orderer) with Kafka setup, and Endorser uses couchdb connection So far, I have found these: > https://github.com/hyperledger/fabric-sdk-node/blob/master/test/fixtures/docker-compose-marbles.yml > https://github.com/hyperledger/fabric-cop/blob/master/docker/docker-compose-cop.yml > https://github.com/hyperledger/fabric/blob/master/bddtests/docker-compose-next-4.yml Unfortunately, none of these connect to #1 (COP) and #2 (Chain network).

abhinav.garg
2017-01-05 08:51
hey everyone I'm interested in setting up an instance of hyper ledger fabric for a small POC to use.

abhinav.garg
2017-01-05 08:51
If anyone,pl let me know

saikondaveeti
2017-01-05 09:28
has joined #fabric

benlewis
2017-01-05 09:34
with the nodesdk, how do I send a query/invoke/deploy request without having to enroll a user?

hgabor
2017-01-05 09:37
has anybody tried to use golang (e.g. Fabric) with IntelliJ?

benlewis
2017-01-05 09:38
@hgabor I had with the Golang plugin. I found Atom with the golang extensions to be arguably as good, if not better though

hgabor
2017-01-05 09:39
hmm maybe I should try that, @benlewis

benlewis
2017-01-05 09:40
@hgabor I preferred it for Golang and I use a lot of Jetbrains IDEs (Pycharm, IntelliJ, CLion etc.). go-plus is the plugin I'm using with Atom

thojest
2017-01-05 09:43
@jzhang but also at all: following this tutorial http://hyperledger-fabric.readthedocs.io/en/v0.6/nodeSDK/sample-standalone-app/ in the last step when executing `CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=0.0.0.0:7051 MEMBERSRVC_ADDRESS=0.0.0.0:7054 DEPLOY_MODE=dev node app` i get the following error(s) in the peer node terminal:

thojest
2017-01-05 09:43
`2017/01/05 10:34:03 transport: http2Server.HandleStreams failed to receive the preface from client: read tcp 127.0.0.1:7051->127.0.0.1:56834: read: connection reset by peer 2017/01/05 10:34:13 transport: http2Server.HandleStreams failed to receive the preface from client: read tcp 127.0.0.1:7051->127.0.0.1:56838: read: connection reset by peer 2017/01/05 10:34:23 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 127.0.0.1:7051->127.0.0.1:56840: write: broken pipe"`

thojest
2017-01-05 09:43
im using v0.6.3 of hfc

thojest
2017-01-05 09:43
hyperledger v0.6

hgabor
2017-01-05 09:43
I have a problem, I added fabric as a project, setup the compiler/sdk but there were unresolved references. E.g. it could not see things defined in other fabric modules. The reason was simple, my project was not in the GOPATH, as it is cloned into a folder called `git`, so it is `git/fabric` but it should be `GOPATH/github.com/hyperledger/fabric...`. I created a link in my /opt/go/src that is the GOPATH by default (the only element). This solves things but sometimes IntelliJ thinks that some modules are project external and if I add a new function it thinks it does not exist. What would be the non-hacky, official solution for this?

hgabor
2017-01-05 09:44
@benlewis I will try that plugin

thojest
2017-01-05 09:44
@jzhang ur right in that i was able to produce the argument error when using a 0.5.* version of hfc. but now even with a 0.6.* version i get this error i have posted

thojest
2017-01-05 09:47
i would be very happy if someone would have an educated guess what exactly is wrong. To be honest I dont really understand what the error message means. Looked into hfc source code but this is too advanced stuff...

benlewis
2017-01-05 09:53
@thojest I'm getting those same errors, but the code /seems/ to be working

benlewis
2017-01-05 09:53
I ran it against my chaincode and got an error that I anticipated

benlewis
2017-01-05 09:54
(Missing function as I hadn't modified app.js at all)

thojest
2017-01-05 09:56
@benlewis same here

thojest
2017-01-05 09:56
how did u modify app.js?

benlewis
2017-01-05 09:58
@thojest My plan is tro modify the function calls to see if they work on my chaincode. If they do, then I'll go from there

thojest
2017-01-05 10:01
ahh ur adapting app.js for your chaincode which u created yourself?

benlewis
2017-01-05 10:03
Yeah

thojest
2017-01-05 10:03
yeah i also have the impression that everything works but the peer still gives me these error messages

thojest
2017-01-05 10:05
maybe this is some logging problem that the messages cannot be sent to the peer node

benlewis
2017-01-05 10:06
Aside from a quirk unmarshalling data, my chaincode seems to be working despite the error messages

thojest
2017-01-05 10:06
thats nice

thojest
2017-01-05 10:06
are u operating in vagrant?

benlewis
2017-01-05 10:07
Yeah, just for simplicity

benlewis
2017-01-05 10:07
I tried running bare metal but gave up

thojest
2017-01-05 10:08
nice im running on bare metal so this problem seems to be platform independent

thojest
2017-01-05 10:10
so how do you proceed?

thojest
2017-01-05 10:10
next would be building a webpage with node js?

benlewis
2017-01-05 10:10
I need to find a way to get a returned result from an invoke transaction, or I need to listen for events, then I should be able to build a webpage

thojest
2017-01-05 10:11
had the same problem getting return values in functions which are mapped to invoke

benlewis
2017-01-05 10:11
Did you find a solution?

thojest
2017-01-05 10:11
but havent found a solution :smile:

benlewis
2017-01-05 10:11
ah

thojest
2017-01-05 10:12
i posted this as a question yesterday but unfortunately nobody answered

benlewis
2017-01-05 10:12
I don't know whether it's possible

thojest
2017-01-05 10:12
yeah could be

benlewis
2017-01-05 10:12
I have the block-listener code working which can listen for gRPC events, so there is a workaround

benlewis
2017-01-05 10:13
but it's not ideal

thojest
2017-01-05 10:21
what is the block-listener cod?

benlewis
2017-01-05 10:24
It's in the examples folder

thojest
2017-01-05 10:25
ahh found it

thojest
2017-01-05 10:25
what is it and what can it do?

benlewis
2017-01-05 10:27
I have it set up to report events from chaincode. So for example, when a transaction completes, you can send data from chaincode to notify other programs

thojest
2017-01-05 10:29
u mean for example a signal to update a website or something like this

benlewis
2017-01-05 10:30
yeah

thojest
2017-01-05 12:24
@benlewis am i correct in assuming that the functions you define in app.js can be called from some button you implement on a webpage?

benlewis
2017-01-05 13:32
@thojest in theory, node hosts the webserver

benlewis
2017-01-05 13:34
so you can call functions based on that

bfuentes
2017-01-05 13:35
i use WebStorm with Go plugin

hgabor
2017-01-05 13:56
@yacovm gogland is not the "go-lang-plugin" right?

hgabor
2017-01-05 13:57
@bfuentes how should I configure gopath properly with that? or how did you configure yours?

yacovm
2017-01-05 13:57
It's a special IDE that is essentially intelliJ

yacovm
2017-01-05 13:57
and I also used before, intelliJ with go plugin

yacovm
2017-01-05 13:57
gogland is "better" IMO

hgabor
2017-01-05 14:07
@yacovm maybe I should try that. I somehow misconfigured my gopath and just trying to find out the proper way.

bfuentes
2017-01-05 14:09
I just code chaincode on it, not running anything locally. I deploy all on an Hyperledger docker image to see the errors in case

rahulhegde
2017-01-05 14:10
@muralisr I was able to deploy & invoke chaincode using dev mode using the peer image provided as part of connect-a-thon set for v1.0. Only thing - the peer CLI image blocks the query Interface. I will try this in my compiled PEER image. Did you get to check the error received via non-dev mode.

muralisr
2017-01-05 14:11
I didn’t unfortunately @rahulhegde … I got sidetracked

muralisr
2017-01-05 14:11
so I won’t make a rash promise beyond I have it in my list and will try it as soon as I can :slightly_smiling_face:

muralisr
2017-01-05 14:12
@rahulhegde that was for the remote deploy correct ? (just making sure as you indicated you are tryign other things as well)

hgabor
2017-01-05 14:13
@yacovm How do you configure gopath? Do you have your repo in /opt/go/src ? Or do you have it somewhere else (where GOPATH is set to) in a directory named http://github.com/hyperledger ? (the repo is just fabric) Mine is under some other directory and I don't want to move it or anything.

yacovm
2017-01-05 14:14
Lets take it to pms?

yacovm
2017-01-05 14:14
Offline

hgabor
2017-01-05 14:14
kk

rahulhegde
2017-01-05 14:18
@muralisr - yes this is remote deployment where peer uses 'go get'.

jjohnst
2017-01-05 14:21
has joined #fabric

jjohnst
2017-01-05 14:56
Any configurations that don't require docker containers to run the fabric?

thojest
2017-01-05 15:14
i have hyperledger v0.6 running and have written a simple chaincode everything works fine

thojest
2017-01-05 15:14
now comes the problem

thojest
2017-01-05 15:15
i want to create a webapp for it and i dont really know what would be the best way to get started. i have already looked in marbles get it working and had a look at the sourcecode on github

thojest
2017-01-05 15:15
and i have to admit that im a bit lost. has anyone a good approach for getting started writing a webapp for a hyperledger smart contract

thojest
2017-01-05 15:17
so basically i think one has to get started with writing a web app which is based on nodejs and then one can include the hfc sdk to interact with the code

thojest
2017-01-05 15:18
code meaning calling functions of the chaincode

thojest
2017-01-05 15:18
so to sum it up. what would you think is the best way to get started?

rahulhegde
2017-01-05 15:42
In v1.0 architecture, Peer docker image compiled has Fabric-Runtime which is built with only busybox. Do we have the peer docker file changes which can also build /bin/bash in the compiled ` make peer-docker ` ?

conorfennell
2017-01-05 15:46
has joined #fabric

nasastry
2017-01-05 15:59
has joined #fabric

dgorman
2017-01-05 16:28
Hi Thomas, @thojest if you’re writing a webapp then you’ll need a javascript program running in node.js. Fabric provides the HFC (Hyperledger Fabric Client) which is the SDK and provides the API to connect to the fabric network and deploy/query/invoke transactions. One of the simplest examples is https://github.com/hyperledger/fabric/blob/v0.6/examples/sdk/node/app.js If you want, you can deploy the chaincode manually, and then just query and invoke using the webapp. You’ll need to use some previously registered users (see https://github.com/hyperledger/fabric/blob/v0.6/membersrvc/membersrvc.yaml), or the webapp can dynamically register them. The webapp will then need to do the one time enrolment which will store the credentials in the KeyValueStore.

thojest
2017-01-05 16:29
@dgorman thx a lot for this nice summary

thojest
2017-01-05 16:29
i think my mainproblem is creating a webpage with nodejs

thojest
2017-01-05 16:29
using stylesheets, html, javascript, .......

thojest
2017-01-05 16:30
so connecting to the smart contract using the api will probably be the smallest part.

thojest
2017-01-05 16:31
and at every corner ur confronted with some fancy new things, like css preprocessors and so on

thojest
2017-01-05 16:32
so if somebody knows some nice tutorial for uber n00bs like me would be very nice ^^

dgorman
2017-01-05 16:34
You’re welcome @thojest, yes it’s likely to be one of the easier parts in the webapp. This is another example which has a simple webapp front end. You could take this and build it out perhaps. https://github.com/angrbrd/hyperledger-fabric-basics#hook-up-front-end

thojest
2017-01-05 16:35
@dgorman thx a lot this seems to be what i need

benlewis
2017-01-05 16:52
@thojest I've managed to get a site built and my code working with my chaincode, using a combination of app.js, the tutorial you sent me and some googling around using Jade (now known as Pug) for the webpage template

benlewis
2017-01-05 16:54
Is it possible to use the node-sdk to listen for events? My aim is to publish them to an SSE stream from node

thojest
2017-01-05 17:49
@benlewis wow that sounds interesting

thojest
2017-01-05 17:50
is there any possibility that i might have a look at it for getting started?

madhava
2017-01-05 18:28
Hi all, have deployed sample chain code02 and able to interact with it from CLI but would like to interact with chaincode through rest API using post ( invoke ) and get ( query ) methods, so can i expose it can you share any references, am planning to expose services using node JS

madhava
2017-01-05 18:29
am referring https://github.com/hyperledger/fabric/blob/v0.6/examples/sdk/node/app.js but this js doesn't have any services exposed from it

eetti
2017-01-05 19:54
has joined #fabric

ramykamel
2017-01-05 19:58
has joined #fabric

hobertbush
2017-01-05 21:30
has joined #fabric

samirsadeghi
2017-01-05 22:37
has joined #fabric

tsluthra
2017-01-06 03:50
has joined #fabric

shimo
2017-01-06 09:58
has joined #fabric

shimo
2017-01-06 10:00
I’d like to use fabric, but I’m not sure which branch I should try. Any suggestion? There are master (v0.7.0) and v0.6.0 branch. which is more stable?

shimo
2017-01-06 10:02
And master branch doesn’t have make membersrvc option, how can I make CA?

benlewis
2017-01-06 10:13
v0.6 is recommended for prototypes and proof-of-concepts as it provides a stable base

benlewis
2017-01-06 10:13
whereas master is under heavy development

shimo
2017-01-06 11:49
ok. thank you!

jjohnst
2017-01-06 14:12
Not familiar with docker, is chaincode deployed to a respository as part of devop processes then chaincode deploy will tell docker to go fetch the new image and spin it up?

garisingh
2017-01-06 14:17
@jjohnst - simple answer is no. Longer answer is that a chaincode deploy transaction includes a Docker image archive (basically a tarball with the Dockerfile and any relevant contents - e.g. the chaincode source code). Each peer then uses that the create a Docker image and then start a container based on that image

jjohnst
2017-01-06 14:18
perfect, thanks

jjohnst
2017-01-06 14:23
@garisingh sorry, one more question. Do you know if anyone has implemented the protocol spec in any other language then go?

ghaskins
2017-01-06 14:23
@garisingh yeah, except we need to change that :wink:

garisingh
2017-01-06 14:33
@jjohnst - we have clients for Node, Python and Java and you can build chaincode in both Java and Go. But for the actual "nodes" no one has built one in another language

jjohnst
2017-01-06 14:47
thx

garisingh
2017-01-06 14:51
I once thought about writing a peer implementation in Scala (just because I like Scala) but then lost interest in that idea :wink:

ghaskins
2017-01-06 14:52
@jjohnst while @garisingh is correct in his description of the current flow, do note that the fact that a Dockerfile is distributed around is an implementation detail, and one that needs to be changed...

ghaskins
2017-01-06 14:52
the operational model should be simply that src is distributed around the network, and each peer forms a docker container locally

ghaskins
2017-01-06 14:53
but to your point, we do not pull the docker image from a repo

ghaskins
2017-01-06 14:53
each peer is building it (even today)

garisingh
2017-01-06 14:53
@ghaskins - do we have a JIRA requirement for the "improvement"? Should not actually be hard to implement

ghaskins
2017-01-06 14:53
we might, let me look

ghaskins
2017-01-06 14:54
ive been complaining about this long enough, i probably wrote one up and forgot :wink:

garisingh
2017-01-06 14:54
I'll take a look as well

ghaskins
2017-01-06 14:59
i didnt find anything obvious

garisingh
2017-01-06 15:12
me neither

nickmelis
2017-01-06 16:50
I’m getting started with Java SDK and when trying to run PeerClientTest, I get "UNKNOWN: Identity or token does not match.” when trying to enroll the registrar

nickmelis
2017-01-06 16:51
I’m running docker with peer and membersrvc images from DockerHub

nickmelis
2017-01-06 16:51
started the node with:

nickmelis
2017-01-06 16:51
- CORE_SECURITY_ENABLED=true - CORE_SECURITY_ENROLLID=test_vp0 - CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT

nickmelis
2017-01-06 16:51
as shown in the wiki

ajspeelm
2017-01-06 17:03
has joined #fabric

nickmelis
2017-01-06 17:22
is there a way to configure the membership service and add users through docker compose and yml?

tkuhrt
2017-01-06 18:09
@nickmelis : Use something like this in your docker compose file: ``` volumes: - ./membersrvc.yaml:/opt/gopath/src/github.com/hyperledger/fabric/membersrvc/membersrvc.yaml ``` Then you can add the users that you want in the membersrvc.yaml file.

tkuhrt
2017-01-06 18:11
So in my docker compose file, I have something like this: ``` membersrvc: image: hyperledger/fabric-membersrvc ports: - "7054:7054" environment: - CORE_VM_ENDPOINT=http://172.17.0.1:2375 command: membersrvc volumes: - ./membersrvc.yaml:/opt/gopath/src/github.com/hyperledger/fabric/membersrvc/membersrvc.yaml ```

sibelius
2017-01-07 14:16
can I decode this information of transaction hash


sibelius
2017-01-07 14:44
``` err: Error: started twice without stopping at Error (native) at ResponseTime.start (/Users/sibelius/Dev/entria/blockchain/block-ticket/node_modules/hfc/src/stats.ts:90:19) at TCertGetter.getTCerts (/Users/sibelius/Dev/entria/blockchain/block-ticket/node_modules/hfc/src/hfc.ts:2138:35) at TCertGetter.getNextTCert (/Users/sibelius/Dev/entria/blockchain/block-ticket/node_modules/hfc/src/hfc.ts:2089:18) at Member.getNextTCert (/Users/sibelius/Dev/entria/blockchain/block-ticket/node_modules/hfc/src/hfc.ts:1126:28) at TransactionContext.getMyTCert (/Users/sibelius/Dev/entria/blockchain/block-ticket/node_modules/hfc/src/hfc.ts:1496:21) at TransactionContext.invoke (/Users/sibelius/Dev/entria/blockchain/block-ticket/node_modules/hfc/src/hfc.ts:1306:14) at Member.invoke (/Users/sibelius/Dev/entria/blockchain/block-ticket/node_modules/hfc/src/hfc.ts:1073:12) ```

sibelius
2017-01-07 14:44
I’m getting this error using `hfc` node sdk package

sibelius
2017-01-07 14:44
can somebody help?

hl.rose
2017-01-07 15:25
has joined #fabric

garisingh
2017-01-07 15:43
@sibelius - if you are not using confidential transactions, then you can just base64-decode the payload

hl.rose
2017-01-07 15:49
i'm having trouble running the cp-web demo using a local network as described in (https://github.com/IBM-Blockchain/cp-web/blob/master/docs/use_local_hyperledger.md). i’m running the nodes and CA in Docker containers, while running the cp-web in my mac. A snippet of my error message is: ``` hfc [MemberServicesImpl.enroll] failed to create cert pair: err={"code":14,"metadata":{"_internal_repr":{}}} +1s hfc [memberServices.enroll] err=Error, enrollment=undefined +1ms chain_setup.js failed to enroll registrar: chain_setup.js ...... { Error at /…/dev/src/cp-web/node_modules/grpc/src/node/src/client.js:417:17 code: 14, metadata: Metadata { _internal_repr: {} } } chain_setup.js couldn't configure the network app.js: Chain setup failed: { Error at /…/dev/src/cp-web/node_modules/grpc/src/node/src/client.js:417:17 code: 14, metadata: Metadata { _internal_repr: {} } } /…/dev/src/cp-web/app.js:225 throw error; ^ Error at /…/dev/src/cp-web/node_modules/grpc/src/node/src/client.js:417:17``` Any help is greatly appreciated

ns
2017-01-07 16:50
has joined #fabric

sibelius
2017-01-07 17:16
@garisingh would be helpful to have this functionally on blockchain-explorer

sibelius
2017-01-07 17:18
@hl.rose make sure your network config is correct

sibelius
2017-01-07 17:18
try this boilerplate


sibelius
2017-01-07 17:19
how can I query all transactions using `hfc` ? is it possible?

sibelius
2017-01-07 17:19
should I use REST api?

sibelius
2017-01-07 17:19
or is there any other api?

sibelius
2017-01-07 17:36
is there any example in nodejs or any language of how to use gRPC language to communicate with peers?

garisingh
2017-01-07 17:44
The current NodeSDK (hfc) uses GRPC to communicate with the peers

hl.rose
2017-01-07 20:16
@sibelius thank you for the suggestion. i wasn't able to get cp-web running locally without a bluemix account. i was able to run the fabric-boilerplate, so i'm hoping to use that and build something similar to cp-web

bartek
2017-01-08 13:44
has joined #fabric

vip77
2017-01-08 13:58
has joined #fabric

madhava
2017-01-08 16:36
general question: am referring the auction use case ( bcoz am planning to implement similar usecase on fabric ), in auction use case the items are moving from one person to other person when we query its shows only the current worldstate of the chain so question is 1) if i want to see complete audit trail for an item how can i query in fabric 2) when a record get stored in block it will have hash for that block, so when show the complete audit trail for an item i believe i should show the records with corresponding block hash, is my understanding is correct? 3) is it possible to get complete audit trail for an item by query block chain any time or do i need to store transaction in external db's by getting hash from block chain when write transaction into blockchain 4) for same use case is it possible to store the image in block chain ( consider my image size will be more than 20MB ) and get a hash for it and refer same hash in actual transaction Appreciate your response in advance :slightly_smiling_face: your reply will really help me to implement use cases


muralisr
2017-01-08 17:20
@madhava `1) if i want to see complete audit trail for an item how can i query in fabric` - depends on which version of the fabric you are working on. 1.0 have plans to support advanced querying mechanisms (including history)…the ppt in https://jira.hyperledger.org/browse/FAB-758 has a few slides on it. Do check in fabric-ledger-dev for mode details

muralisr
2017-01-08 17:22
2) and 3) “audit trail” questions depend upon that history query question. `4) for same use case is it possible to store the image in block chain ` yes. That’s a useful pattern in fact

muralisr
2017-01-08 17:24
^^^ note that the above does not address “history” in 0.6. Broadly, no in-built support in the fabric for that in 0.6. You would have to either maintain it in chaincode state somehow or mine blocks for transactions related to the chaincode.

madhava
2017-01-08 17:30
Thanks @muralisr for your quick response, is 1.0 is a stable environment? as per community and my understanding its released week or 2 weeks back, as am any new to Fabric so may be its good idea to start with 1.0, please suggests. I just installed 0.6 on one node last week so i can cleanup that and go for 1.0

muralisr
2017-01-08 17:32
@madhava the support for history is not yet there in 1.0 so if that’s the aim, I’d say continue on 0.6

muralisr
2017-01-08 17:35
given you have started off on 0.6, in your shoes I’d stay on it

madhava
2017-01-08 17:38
Thanks once again @muralisr , one more request, am running chaincode02 and able to interact with cli, but am planning to interact with by exposing services through NodeJS do you have any reference on how to expose chain code as services, have installed HFC too

muralisr
2017-01-08 17:41
“expose as services” to mean expose some APIs using the NodeJS SDK to encapsulate invokes and queries to the chaincode as biz functions ?

muralisr
2017-01-08 17:43
@madhava I’d think code under `sdk/node/test/unit` in the fabric would help ?

madhava
2017-01-08 17:46
that's correct "invokes and queries to the chaincode as biz functions", through UI am planning to call these individual API's just by passing the required attributes

madhava
2017-01-08 18:10
@muralisr am just went through one or two examples in sdk/node/test/unit but i didn't find any functions exposed through post or get methods, my idea is use express module in NodeJS to expose these functions through post and get methods

muralisr
2017-01-08 18:11
ok

muralisr
2017-01-08 18:11
in that case an approach would be to use the REST api’s in the fabric directly in your nodejs

madhava
2017-01-08 18:12
yes do you have any reference for this can you please share it

muralisr
2017-01-08 18:13
I don’t have reference to using the REST api’s in a nodejs as example… maybe others have done that and can share ?

muralisr
2017-01-08 18:13
but are you looking for the REST api reference itself

muralisr
2017-01-08 18:13
?

madhava
2017-01-08 18:15
yes, bcoz i want my API's should be decoupled from UI so that i can reuse services in multiple places as needed

muralisr
2017-01-08 18:16
http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Chaincode-setup/ shows you how to use REST APIs (look for `Running the CLI or REST API`)

madhava
2017-01-08 18:16
so chain code is independent from services and UI is independent from API's

muralisr
2017-01-08 18:16
I’d start off without doing security

muralisr
2017-01-08 18:17
right, those REST api’s would be a good start to hook up into a nodejs app

madhava
2017-01-08 18:21
i went through above example but in those example we are sending everything in body including chaincodeID etc, rather my idea is expose services like GET http://hostname:portnumber/menthodname?query or path param

muralisr
2017-01-08 18:22
perhaps wrap those in your nodesjs ?

madhava
2017-01-08 18:22
this way UI layer no need to know which chain code they need to call

madhava
2017-01-08 18:23
they just need to know the method which they need to call

muralisr
2017-01-08 18:23
sounds like a good approach… but better to tailor them to your app

muralisr
2017-01-08 18:23
as opposed to a generic api … but you could do either way I suppose

madhava
2017-01-08 18:24
ok let me check but Thanks for your help as always

muralisr
2017-01-08 18:25
sure thing

akira
2017-01-08 23:47
@akira has left the channel

geahaad
2017-01-09 05:31
has joined #fabric

jojocheung
2017-01-09 07:54
has joined #fabric

nickmelis
2017-01-09 08:26

nickmelis
2017-01-09 08:26
I’m also reading about the new membership service that is being developed as part of v1.0 called “COP"

nickmelis
2017-01-09 08:27
when following the tutorial above, two images are being pulled, fabric_peer and fabric_membersvc

nickmelis
2017-01-09 08:28
what’s the easiest way to configure a new user in the membership service? Do I have to follow the guide for “COP” or refer to the old documentation?

benlewis
2017-01-09 09:36
Has anyone managed to make the node-sdk work with their own app?

benlewis
2017-01-09 09:37
I'm struggling with a small part and would appreciate any guidance, I'm using v0.6

sibelius
2017-01-09 10:31

keithsmith
2017-01-09 11:01
@nickmelis Nick, follow the COP documentation for adding a new user to COP for v1

benlewis
2017-01-09 11:01
@sibelius thanks, this his pointed me in the right direction, thanks. I was misunderstanding JavaScript callbacks

nickmelis
2017-01-09 11:02
@keithsmith I suspect the Docker images in the documentation still use v0.6, am I right?

sibelius
2017-01-09 11:02
javascript callbacks is a mess

sibelius
2017-01-09 11:02
u should use promises with async/await es7 feature

benlewis
2017-01-09 11:02
The example stuff from the fabric repo uses callbacks, so my plan was to follow on from that

sibelius
2017-01-09 11:03
I’ll release soon a boilerplate using hyperledger + graphql

nickmelis
2017-01-09 11:03
also does anybody know what does this error in the log mean? vp0_1 | 10:10:51.351 [chaincode] Launch -> ERRO 976 sending init failed(handler not found for chaincode 90177b08b536a64b08fdd8d535a24565ce59091d61241ac8b5ce9d8c44aec5f3)

nickmelis
2017-01-09 11:03
trying to deploy some chaincode using Java SDK

benlewis
2017-01-09 11:03
I will keep an eye out for that, thanks

benlewis
2017-01-09 11:04
@nickmelis are you running in development mode?

nickmelis
2017-01-09 11:04
@benlewis how do I check?

nickmelis
2017-01-09 11:04
I’ve just started peer and membersrvc using docker-compose

benlewis
2017-01-09 11:05
Ah okay, I'm not familiar with docker and v1.0 I've only used v0.6

nickmelis
2017-01-09 11:05
I’m not even sure docker images use v1.0 tbh


nickmelis
2017-01-09 11:06
@benlewis can you tell me about this dev mode? How do you enable it?


benlewis
2017-01-09 11:08
This has some details on using it with Java, but I've only used Golang, as despite the learning curve, there's more support

nickmelis
2017-01-09 11:10
do you know what the difference is between dev mode and non dev mode?

keithsmith
2017-01-09 11:28
@nickmelis In dev mode, you start the chaincode manually which gives you more control when debugging. In non-dev mode, the peer starts the chaincode container automatically for you when deployed.

nickmelis
2017-01-09 11:31
here’s another question: does the chaincode need to sit on the node in order for it to be deployed?

nickmelis
2017-01-09 11:31
I remember it was like this a few months ago

nickmelis
2017-01-09 11:32
but on other blockchain platforms (see Ethereum) you can compile the chaincode by yourself and then just send the bytecode to the blockchain

nickmelis
2017-01-09 14:00
@keithsmith , when you say “you start the chaincode manually”, what do you mean?

ghaskins
2017-01-09 14:13
@nickmelis its a bit of an (understandable) misnomer that the code had to be "on the node"

nickmelis
2017-01-09 14:14
so the path I am sending together with the transaction has to be the path of the chaincode on the node?

ghaskins
2017-01-09 14:14
really what was needed was the code had to be local to "your stack", which in the v0.6 architecture and prior _could_ include your NVP

ghaskins
2017-01-09 14:15
thats the misnomer part: you are sending a path relative to the SDK/NVP, not the peer cloud

ghaskins
2017-01-09 14:15
it was confusing, and many many people got hung up on this (myself included)

nickmelis
2017-01-09 14:16
ok that’s what I thought. But even though I am sending the path of the chaincode on the SDK node (the app), I get this error on the node:

nickmelis
2017-01-09 14:16
vp0_1 | 13:43:15.315 [chaincode] Launch -> ERRO 6af sending init failed(handler not found for chaincode myccj)

ghaskins
2017-01-09 14:16
in that architecture, the NVP was supposed to be considered part of your client, not the peer cloud

ghaskins
2017-01-09 14:16
hmm, ok, well that is something else I think

nickmelis
2017-01-09 14:17
in fact the SDK doesn’t blow up, just receives a chaincode response status = UNDEFINED

ghaskins
2017-01-09 14:17
ive not seen that: are you running v0.6 or master?

nickmelis
2017-01-09 14:18
SDK is from master, node is running using docker-compose and the docker images fabric-peer and fabric-membersrvc from the documentation

nickmelis
2017-01-09 14:18
now I’m not 100% sure those images from DockerHub are from master rather than v0.6

nickmelis
2017-01-09 14:19
do you have any idea?

ghaskins
2017-01-09 14:20
the only images on dockerhub are v0.6 to my knowledge

ghaskins
2017-01-09 14:20
(and generally, I have been the one publishing them)

ghaskins
2017-01-09 14:20
though it is possible someone else released something without me knowing, but its not likely

ghaskins
2017-01-09 14:21
i think that might be part of your problem though...i do not think the master SDK is compatible with v0.6

ghaskins
2017-01-09 14:21
if you are using v0.6, I would use HFC v0.6.5 from npm

ghaskins
2017-01-09 14:21
I've built POCs with that combo and it works well, fwiw

nickmelis
2017-01-09 14:23
ok here’s the question then: can I build v1.0 docker images myself?

nickmelis
2017-01-09 14:23
so that I can use master SDK with master fabric?

weihu
2017-01-09 14:26
has joined #fabric

garisingh
2017-01-09 14:31
@nickmelis - the Fabric Makefile has targets for just building the Docker images - so yes

nickmelis
2017-01-09 14:32

nickmelis
2017-01-09 14:47
ok something has definitely changed now, I am now getting “Failed getting a new TCert”. Suspect it’s something to do with the membersrvc?

ghaskins
2017-01-09 15:12
@nickmelis: just do "make docker" and it will make the images for v1.0 locally

jwalters
2017-01-09 15:14
has joined #fabric

nickmelis
2017-01-09 15:17
@ghaskins thanks for the tip. Have you got any idea what may be causing the error with the TCert? There’s no clue in HL log, just this log in the SDK

ghaskins
2017-01-09 15:20
no, are you running cop?

nickmelis
2017-01-09 15:20

nickmelis
2017-01-09 15:21
which are supposed to be built from the master branch

ghaskins
2017-01-09 15:23
ah, ok, i am not familiar with what yeasy published

nickmelis
2017-01-09 15:23
would you suggest to create my images myself by building them locally?

ghaskins
2017-01-09 15:24
i guess the short answer is: if you are trying to do v1.0 work with the SDK, I would do whatever the v1.0 SDK folks do :wink:

ghaskins
2017-01-09 15:24
I was trying to get this stood up last week, and I am pretty close, I but I am certainly no expert

ghaskins
2017-01-09 15:24
but that was the approach I took

nickmelis
2017-01-09 15:24
and how do I get to know what the SDK folks do? :slightly_smiling_face:

nickmelis
2017-01-09 15:25
note SDK is Java SDK here

ghaskins
2017-01-09 15:25
best to start with either @jzhang or #fabric-sdk-node-dev

ghaskins
2017-01-09 15:25
ah, ok

ghaskins
2017-01-09 15:25
well, then I am not sure

nickmelis
2017-01-09 15:27
as far as you know, is there any docker v1.0 image out there?

nickmelis
2017-01-09 15:27
have you tested any?

gary
2017-01-09 15:29
has joined #fabric

ghaskins
2017-01-09 15:31
as I mentioned earlier, I am involved with the official images and I do not believe there are any official v1.0 releases floating around

ghaskins
2017-01-09 15:31
there certainly could be derivative repos out there that I am not aware of though

ghaskins
2017-01-09 15:32
it does appear there is a #fabric-sdk-java channel though

ghaskins
2017-01-09 15:32
perhaps start there

nickmelis
2017-01-09 15:35
yeah makes sense

nickmelis
2017-01-09 15:35
so all the v1.0 docker images out there (if any) are “non official”, right?

nickmelis
2017-01-09 15:35
I might as well build my own image then

ghaskins
2017-01-09 15:42
yeah...I was actually just working on cleaning up the fabric-cop image actually

ghaskins
2017-01-09 15:42
so, I know the fabric-peer/fabric-orderer are in good shape...just check out fabric.git and "make docker"

ghaskins
2017-01-09 15:42
soon, same for cop

ghaskins
2017-01-09 15:42
as far as java-sdk particulars, you'd have to ask the java devs

ghaskins
2017-01-09 15:42
I use node-sdk myself

nickmelis
2017-01-09 15:43
cop is the old membersrvc right?

ghaskins
2017-01-09 15:43
right

nickmelis
2017-01-09 15:43
does it mean cop is not ready yet?

ghaskins
2017-01-09 15:43
fabric-cop.git is what was formerly fabric.git/membersvc, IIUC

ghaskins
2017-01-09 15:43
no, sorry didnt mean to imply that

ghaskins
2017-01-09 15:43
I think cop probably runs fine stand alone, I was trying to improve the dockerization of it

ghaskins
2017-01-09 15:44
again, this is newly emerging understanding for me too (as of Friday) so I am not the best source

ghaskins
2017-01-09 15:44
best source would be to ask the x-sdk devs what they do

nickmelis
2017-01-09 15:44
ok so if I wanted to stick with v1.0 I should be able to build fabric and fabric-cop as docker images right?

ghaskins
2017-01-09 15:45
def fabric, probably fabric-cop, I should have my patch which makes fabric-cop image a little more turn key shortly

ghaskins
2017-01-09 15:45
as in, today

ghaskins
2017-01-09 15:45
ill ping you when I push the CR

nickmelis
2017-01-09 15:45
awesome, thanks a lot!

nickmelis
2017-01-09 15:47
also I hope I can get in touch with someone from the Java SDK

jonathanlevi
2017-01-09 15:58
@nickmelis: Indeed, if you want to work with the very latest, right now - you can build the images on your own. Things are “in the making” and every week, we get more stuff that is better tested, (relatively!) more stable, better documented, etc. Also, you may want to join #fabric-cop and #fabric-sdk-java and other channels. Just ask around, and we’ll point them out to you.

fbenhamo
2017-01-09 16:10
Hi, I'm trying to compile fabric on macos Sierra, and unit-test seems to fail. The first error is unit-tests_1 | 2017-01-09 15:38:54.405 UTC [chaincode] processStream -> ERRO 16c5 Error handling chaincode support stream: stream error: code = 1 desc = "context canceled"

fbenhamo
2017-01-09 16:14
By the way, I think the following pip packages are missing in https://github.com/hyperledger/fabric/blob/master/docs/dev-setup/devenv.md: grpcio protobuf

robflowers212
2017-01-09 17:13
has joined #fabric

chuankai
2017-01-10 06:52
has joined #fabric

babedev
2017-01-10 07:48
has joined #fabric

benlewis
2017-01-10 09:39
In the vagrant environment, is there a way of resetting tokens with membersrvc?

benlewis
2017-01-10 09:43
Sorted it, the files are stored in a hidden folder in /var/hyperledger/production

bjoerntm
2017-01-10 09:45
has joined #fabric

nickmelis
2017-01-10 10:45
I’ve switched to v0.6 but still getting the following error when deploying chaincode: ```vp0_1 | 10:55:13.818 [chaincode] Deploy -> DEBU 273 user runs chaincode, not deploying chaincode vp0_1 | 10:55:13.818 [state] TxBegin -> DEBU 274 txBegin() for txId [mycc] vp0_1 | 10:55:13.818 [chaincode] sendInitOrReady -> DEBU 275 handler not found for chaincode mycc vp0_1 | 10:55:13.818 [chaincode] Launch -> ERRO 276 sending init failed(handler not found for chaincode mycc) ```

nickmelis
2017-01-10 10:46
running in dev mode…anyone know what’s causing it?

benlewis
2017-01-10 10:47
have you run the chaincode?

benlewis
2017-01-10 10:47
Are you using Java?

nickmelis
2017-01-10 10:48
I’m using Java SDK, what do you mean with “run the chaincode”?

nickmelis
2017-01-10 10:49
running the SDK unit tests, chaincode gets deployed and then invoked and queried

nickmelis
2017-01-10 10:49
what I get in HL logs when deploying is the error above


nickmelis
2017-01-10 11:01
what does that mean?

subax
2017-01-10 11:12
has joined #fabric

subax
2017-01-10 11:26
Hi All, we use Hyperledger 0.6 version, in the blockchain app we are building, during chaincode deployment we do other things like creating table, creating cache, populating metadata etc., the problem is, when lets say the deploy request fails, we are not sure whether its related to the image/core issue or some problem with the code that we wrote. Because even to get a log we should have a chaincode id, which is possible only when the deploy is successful. Is there a way out for solving this issue.

nickmelis
2017-01-10 11:27
@subax I may be having the same problem, what’s in the node log? What’s the error?

subax
2017-01-10 11:30
hmm…when deploy fails, the container never gets created, so no logs

nickmelis
2017-01-10 12:38
```vp0_1 | 12:29:40.804 [dockercontroller] deployImage -> ERRO 047 Error building images: API error (500): {"message":"Cannot locate specified Dockerfile: Dockerfile"} vp0_1 | 12:29:40.804 [dockercontroller] deployImage -> ERRO 048 Image Output: vp0_1 | ******************** vp0_1 | vp0_1 | ******************** ```

nickmelis
2017-01-10 12:38
trying to deploy chaincode in non dev mode, anyone familiar with that?

egeek
2017-01-10 14:28
has joined #fabric

enidz
2017-01-10 14:34
HI all I need help to use this : ``` # Example1: # The 'admin' user below can register clients, peers, validators, or auditors; furthermore, the 'admin' user can register other # users who can then register clients only. # Example2: # The 'WebAppAdmin' user below can register clients only, but none of the users registered by this user can register other users. ``` how can I use those properties ? I didn't find anything about it in the documentation :confused:

nickmelis
2017-01-10 16:02
anyone know why I get ```UNKNOWN: sql: no rows in result set``` while trying to register a user with the membersrvc?

pd93
2017-01-10 16:28
Does anyone know what's going on here when using the grpc.Dial method? `2017/01/10 16:06:08 Failed to dial 192.168.x.x:7053: grpc: the connection is closing; please retry.` `rpc error: code = 9 desc = grpc: the client connection is closing`

aliblackwell
2017-01-10 17:18
@sibelius I’d love to help with this, is there a repo anywhere?

vijayr24
2017-01-10 19:04
@nickmelis - you are getting that error because the user you are trying to enroll with is not available in the membersrvcs.yaml file

sibelius
2017-01-10 19:15
@aliblackwell maybe next week

ikruiper
2017-01-10 20:28
Hi, is there any rough timeline for the v1 release? thanks

nocturnien
2017-01-11 02:11
has joined #fabric

nocturnien
2017-01-11 02:12
@ikruiper I saw in a presentation March 2017 as the v1 release date

nocturnien
2017-01-11 02:18

wjq
2017-01-11 06:17
Hello. Does anyone know in fabric 0.6, how tcert and ecert are related? for example, how the auditors know one tcert is owned by the ecert?

abhinav.garg
2017-01-11 06:22
In car lease demo, I want to know where the API's being kept and how from Go or node.js being they are fetching.

babedev
2017-01-11 07:13
Hi, I tried https://github.com/IBM-Blockchain/fabric-boilerplate. I could not logged in with john1/pass@w0rd . Got 'ResourceNotFound: ledger: resource not found' message.

wangmzdl
2017-01-11 08:48
has joined #fabric

sibelius
2017-01-11 10:04
@babedev @abhinav.garg ask ask for help on #help channel

subax
2017-01-11 10:18
Hi, For hyperledger 0.6 version other than MAC OS and windows any other OS are supported. Is Ubuntu supported?

grapebaba
2017-01-11 10:19
Should cross platform

zemtsov
2017-01-11 10:20
there are images for different platforms. you can use it to start via Docker on your system

grapebaba
2017-01-11 10:20
just a standard go program

lgrace896
2017-01-11 11:01
Hi all. Can anybody explain how ecert expiration works in fabric 0.6? I am assuming that once the membership service is created, the expiration date is set for some time (3 months?) after it starts

nits7sid
2017-01-11 11:39
Hi. I tried running an infinite loop in a invoke function. I noticed that the transactions was unsuccessful. How is the fabric handling the memory/RAM utilization of peers? Below is the snippet of code I tried. func (t *SimpleChaincode) Invoke(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) { for { fmt.Println("empty") } return nil,nil }

muralisr
2017-01-11 12:58
@nits7sid currently the invoke will just timeout

nits7sid
2017-01-11 13:04
@murali thanks..

nits7sid
2017-01-11 14:50
@muralisr wat is the approx timeout period?

muralisr
2017-01-11 14:52
currently 30 secs I think

benlewis
2017-01-11 14:53
@nits7sid I saw you had used Credits in the Issues repo. Do you have any idea why their provided examples would fail?

nickmelis
2017-01-11 14:54
is it possible to browse the history of a given chaincode state?

nits7sid
2017-01-11 14:56
@muralisr ok..

nits7sid
2017-01-11 14:57
@benlewis: actually in the documentation they had provided incorrect information to run the example which caused them to fail

benlewis
2017-01-11 14:57
@nits7sid thanks, do you know if there is correct information available?

benlewis
2017-01-11 14:57
or where I'd need to look?

nits7sid
2017-01-11 15:00
@benlewis I wil check if I have them or else u can contact the developer itself.

nits7sid
2017-01-11 15:00
@muralisr ..Is C-C to interaction possible when privacy turned on in v0.6?

bur
2017-01-11 15:01
has joined #fabric

satyam_agl
2017-01-11 16:45
@abhinav.garg you can get it from car-lease-demo\Documentation\API methods and car-lease-demo\Documentation\Chaincode interface

satyam_agl
2017-01-11 16:46
or you can see the app.js where all the api routing is written

satyam_agl
2017-01-11 16:47
or you can directly see the chaincode in the chaincode folder in which no. of functions definition are listed you can read it from their

muralisr
2017-01-11 16:55
@nits7sid C-C interaction is not possible with privacy on in v0.6. That said, note that the security model is different in 1.0 so better to have a migration plan. The approach I’d take is to not rely upon privacy being turned on in 0.6. For more info do check with fabric-crypto

hl.rose
2017-01-11 17:01
any suggestions on how to run the cp-web demo using a local network created from IBM-Blockchain/fabric-images? I encounter the "Identity or token does not match" error when I used "enrollId": "WebAppAdmin" and "enrollSecret": "DJY27pEnl16d" in the mycreds.json configuration file. I posted the same question but with more details of my attempts in GitHub (https://github.com/IBM-Blockchain/cp-web/issues/67), but haven't gotten a response yet. So, I'm wondering if anyone here would know

nits7sid
2017-01-12 03:08
@muralisr thanks

nits7sid
2017-01-12 03:19
@muralisr In v1.0 how is the security model different from v0.6 ?

weihu
2017-01-12 06:06
@weihu uploaded a file: https://hyperledgerproject.slack.com/files/weihu/F3PQQR589/pasted_image_at_2017_01_12_02_06_pm.png and commented: hello, when i run command `make dist-clean all`, I got error:

weihu
2017-01-12 06:06
can anyone help me?

mrcso
2017-01-12 08:11
has joined #fabric

joee
2017-01-12 09:12
Chain allows interoperability between different instances e.g. Alice creates asset X in Bank A’s Chain. Bob is a user in Bank B’s Chain. Alice can send pieces of her asset to Bob even though it’s on another Chain. Is this kind of interoperability in the scope for Fabric 1.0?

marvsperez
2017-01-12 10:48
has joined #fabric

arnaud
2017-01-12 12:47
@weihu about your errors, can you please tell us about your environment? where are you trying to run "make"? what type of machine+os? To work this will only run natively on linux or MacOS, on other platforms you need to run vagrant (which will set up a virtual linux machine)

pd93
2017-01-12 14:45
@pd93 uploaded a file: https://hyperledgerproject.slack.com/files/pd93/F3RBAPGR5/bluemix_deployment_error.sh and commented: I've been running Fabric locally for a while now, but today I decided to try Bluemix. I've gone through everything in the host_marbles_bluemix guide to get it running, but I'm getting this error when running `cf push <app>`. The webapp works, but the chaincode fails to deploy. Have I missed something that's not covered here: https://github.com/IBM-Blockchain/marbles/blob/v2.0/docs/host_marbles_bluemix.md

rachweb2
2017-01-12 17:19
has joined #fabric

schristie
2017-01-12 21:00
has joined #fabric

jmanweiler
2017-01-12 21:44
has joined #fabric

nocturnien
2017-01-12 23:06
Does Fabric uses UTXO or something else?

rkr
2017-01-13 04:04
Has anybody installed fabric using docker swarm ? if yes please share docs or any relevant info :slightly_smiling_face:

abhinav.garg
2017-01-13 05:59
@rkr if you got,then plz share with me too

harsha544
2017-01-13 06:29
@rkr What exactly are you trying with docker-swarm -- ?

ug1y
2017-01-13 07:14
has joined #fabric

warm3snow
2017-01-13 08:35
Hi, everyone. Asking your help. When i test fabric-v1.0, I got this error, can anyone give me some clue? ``` unit-tests_1 | --- FAIL: TestConfigerInvokeJoinChainCorrectParams (0.03s) unit-tests_1 | configer_test.go:55: Local peer IP address: 172.17.0.3:21213 unit-tests_1 | panic: ---empty version---(chain=mytestchainid,chaincode=lccc,version=,txid=9f5c8a3d-a738-4054-8f27-cdc3bc094bda,syscc=true,proposal=0x0 [recovered] unit-tests_1 | panic: ---empty version---(chain=mytestchainid,chaincode=lccc,version=,txid=9f5c8a3d-a738-4054-8f27-cdc3bc094bda,syscc=true,proposal=0x0 unit-tests_1 | unit-tests_1 | goroutine 23 [running]: unit-tests_1 | panic(0xa4aa60, 0xc4202e7d00) unit-tests_1 | /opt/go/src/runtime/panic.go:500 +0x1a1 unit-tests_1 | testing.tRunner.func1(0xc420283c80) unit-tests_1 | /opt/go/src/testing/testing.go:579 +0x25d unit-tests_1 | panic(0xa4aa60, 0xc4202e7d00) unit-tests_1 | /opt/go/src/runtime/panic.go:458 +0x243 unit-tests_1 | http://github.com/hyperledger/fabric/core/chaincode.NewCCContext(0xc4202e77e0, 0xd, 0xb50520, 0x4, 0x0, 0x0, 0xc4202e2510, 0x24, 0xabc901, 0x0, ...) unit-tests_1 | http://github.com/hyperledger/fabric/core/chaincode/_test/_obj_test/chaincode_support.go:87 +0xa43 unit-tests_1 | http://github.com/hyperledger/fabric/core/chaincode.deploySysCC(0xc4202e77e0, 0xd, 0xec06c0, 0x0, 0x0) unit-tests_1 | http://github.com/hyperledger/fabric/core/chaincode/_test/_obj_test/sysccapi.go:130 +0x59f unit-tests_1 | http://github.com/hyperledger/fabric/core/chaincode.DeploySysCCs(0xc4202e77e0, 0xd) unit-tests_1 | http://github.com/hyperledger/fabric/core/chaincode/_test/_obj_test/importsysccs.go:62 +0xab unit-tests_1 | http://github.com/hyperledger/fabric/core/chaincode.joinChain(0xc4202f3200, 0x11ca, 0x1200, 0x9, 0x1, 0x1, 0x410f2e, 0xc4202cbc80) unit-tests_1 | http://github.com/hyperledger/fabric/core/chaincode/_test/_obj_test/configer.go:119 +0x269 unit-tests_1 | http://github.com/hyperledger/fabric/core/chaincode.(*PeerConfiger).Invoke(0xee6bb8, 0xea3800, 0xc4202cc180, 0x411758, 0x30, 0xa54c00, 0x1, 0xc4202cbc80) unit-tests_1 | http://github.com/hyperledger/fabric/core/chaincode/_test/_obj_test/configer.go:69 +0x544 unit-tests_1 | http://github.com/hyperledger/fabric/core/chaincode/shim.(*MockStub).MockInvoke(0xc4202cc180, 0xb4f909, 0x1, 0xc4202cbc80, 0x2, 0x2, 0x0, 0x1, 0x0, 0xc4202ca870, ...) unit-tests_1 | /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim/mockstub.go:120 +0x95 unit-tests_1 | http://github.com/hyperledger/fabric/core/chaincode.TestConfigerInvokeJoinChainCorrectParams(0xc420283c80) unit-tests_1 | /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/configer_test.go:125 +0x51c unit-tests_1 | testing.tRunner(0xc420283c80, 0xbba550) unit-tests_1 | /opt/go/src/testing/testing.go:610 +0x81 unit-tests_1 | created by testing.(*T).Run unit-tests_1 | /opt/go/src/testing/testing.go:646 +0x2ec unit-tests_1 | FAIL http://github.com/hyperledger/fabric/core/chaincode 0.081s unit-tests_1 | error: exit status 1 unit-tests_1 | panic: EOF ```

warm3snow
2017-01-13 08:36
It said "empty version". How can i fix this.

warm3snow
2017-01-13 09:23
Also, when I execute ```docker-compose -f docker-compose-with-orderer.yml up``` in fabric/bdtests/. It returns ```ERROR: In file './docker-compose-with-orderer.yml' service 'version' doesn't have any configuration options. All top level keys in your docker-compose.yml ns.```

grapebaba
2017-01-13 10:39
seems you should upgrade your docker compose

pjhaga
2017-01-13 10:47
Does anyone have an example which demonstrates how to send events from blockchain to, for example, a nodeJS application?

sneha
2017-01-13 12:57
has joined #fabric

sneha
2017-01-13 13:17
Hi All, We are facing issue while invoking chaincode on fabric v1.0. Could you please provide your inputs. Registration and deployment of chaincode is successful. However when we try to invoke chaincode using CLI we are getting error. Command:- peer chaincode invoke -n mycc -c '{"Args":["write","hello_world","200"]}' 12:42:05.880 [main] main -> INFO 001 User defined config file path: /etc/hyperledger/fabric 12:42:05.883 [msp] func1 -> INFO 002 Creating the msp manager 12:42:05.883 [msp] GetManager -> INFO 003 Returning MSP manager %!p(msp.peerMspManagerImpl={map[] false}) 12:42:05.883 [msp] Setup -> INFO 004 Setting up the MSP manager from config file /etc/hyperledger/fabric/msp/peer-config.json 12:42:05.883 [msp] newBccspMsp -> INFO 005 Creating BCCSP-based MSP instance 12:42:05.884 [SW_BCCSP] init -> WARN 006 'security.bccsp.default.keyStorePath' not set. Using the default directory [%s] for temporary files /tmp 12:42:05.884 [SW_BCCSP] init -> INFO 007 Root Path [/tmp] 12:42:05.884 [SW_BCCSP] createKeyStoreIfNotExists -> INFO 008 Keystore path [/tmp/crypto/ks] missing [true]: [<clean>] 12:42:05.884 [msp] Setup -> INFO 009 Setting up MSP DEFAULT 12:42:05.884 [msp] Setup -> INFO 00a Setting up MSP instance from file /etc/hyperledger/fabric/msp/peer-config.json 12:42:05.909 [msp] newIdentity -> INFO 00b Creating identity instance for ID &{{DEFAULT} ROOTCA} 12:42:05.909 [msp] newSigningIdentity -> INFO 00c Creating signing identity instance for ID &{{DEFAULT} PEER} 12:42:05.909 [msp] Setup -> INFO 00d MSP manager setup complete (config file /etc/hyperledger/fabric/msp/peer-config.json) 12:42:05.909 [logging] LoggingInit -> DEBU 00e Setting default logging level to DEBUG for command 'chaincode' 12:42:05.912 [msp] GetManager -> INFO 00f Returning MSP manager %!p(msp.peerMspManagerImpl={map[DEFAULT:0xc4201f8570] PeerMSPManager true}) 12:42:05.912 [msp] GetSigningIdentity -> INFO 010 Looking up MSP with ID {DEFAULT} 12:42:05.912 [msp] GetSigningIdentity -> INFO 011 Obtaining signing identity for &{{DEFAULT} PEER} 12:42:05.914 [msp] Sign -> INFO 012 Signing message Error: Error endorsing chaincode: rpc error: code = 2 desc = Error deploying chaincode: Failed to launch chaincode spec(Failed to init chaincode(handler not found for chaincode mycc))

muralisr
2017-01-13 13:44
@sneha can you share your steps for testing above please ?

muralisr
2017-01-13 13:45
1) how the orderer is started (2) how is the peer started

muralisr
2017-01-13 13:46
@warm3snow what command are you using to run the tests ?

erickan
2017-01-13 15:46
has joined #fabric

yashgt
2017-01-13 17:03
has joined #fabric

ry
2017-01-13 18:06
@ry has left the channel

tooraj.musk
2017-01-13 20:22
has joined #fabric

crmiles
2017-01-13 20:28
has joined #fabric

rahulhegde
2017-01-13 22:56
@muralisr, @garisingh I was looking at the same issue and working with @sneha. There is gRPC error from orderer when it tries to send the Deploy Transaction Block to Peer. Port exposed by peer by default is 7051. However orderer uses the right docker container IP of Commiter Peer (which is also endorser for 1 Peer Setup) but a different port (48144 and randomly in increasing order). This results in write broken pipe error. How does Orderer know about the list of Committer Peers (IP, Port) on the Hyperledger network, is there a way can provide more debug information or is there a known solution? Setup: Fabric {peer, cop and orderer} images are used from the connect-a-thon - v1.0 architecture and is currently used to run a custom-helloworld-chaincode using DEV mode. Secondly - I have tried this on Linux box hosted on AWS and has never seen this problem however on our internal organization boxes (Intranet one of the environment difference), we see this error almost frequently.

joee
2017-01-14 14:31
Chain allows interoperability between different instances e.g. Alice creates asset X in Bank A’s Chain. Bob is a user in Bank B’s Chain. Alice can send pieces of her asset to Bob even though it’s on another Chain. Is this kind of interoperability in the scope for Fabric 1.0?

cbf
2017-01-14 18:54
@joee Fabric v1.0 has the notion of channels, which could be leveraged, I believe in the manner you suggest

garisingh
2017-01-14 18:54
@muralisr - if running in dev mode, what's the env variable you need to set on the chaincode and/or peer side?

garisingh
2017-01-14 18:54
I have a feeling that might be the issue @sneha is facing? at least I've seen that before

muralisr
2017-01-14 18:55
@garisingh reading...

garisingh
2017-01-14 18:56
@warm3snow - you need docker-compose 1.8 or above

muralisr
2017-01-14 18:58
right I was not sure of the configurations here…contradictions in two comments made me pause (1) `There is gRPC error from orderer when it tries to send the Deploy Transaction Block to Peer.` from @rahulhegde and (2) `Registration and deployment of chaincode is successful.` from @sneha

muralisr
2017-01-14 18:58
and `I was looking at the same issue and working with @sneha.` from @rahulhegde

muralisr
2017-01-14 18:59
sounded like different problems but from same configuration ….

muralisr
2017-01-14 19:01
also `images are used from the connect-a-thon - v1.0 architecture ` from @rahulhegde … the devmode env variables in latest master might be slightly different than with images used in connect-a-thon (the chaincode needs to register with the fully qualified namespace “mycc:0/**TEST_CHAINID**”)

muralisr
2017-01-14 19:02
I wanted to wait till I heard back from @sneha

garisingh
2017-01-14 19:04
gotcha

muralisr
2017-01-14 19:47

rahulhegde
2017-01-14 21:40
@muralisr @garisingh We have followed the same steps >quote https://jira.hyperledger.org/secure/attachment/10378/peerchaincodedev_in_1.0.txt >quote using the images from the connect-a-thon/marble application. There is no multi-chain that is tried in our steps (i.e. no-chain id specified) and I doubt these images support it. Coming to the scenario Though @sneha mentions chaincode deployment is success ` CORE_CHAINCODE_MODE=dev peer chaincode deploy -n mycc -c '{"Args":["init","a","100","b","200"]}' ` . Looking at Peer CLI logs it gives a impression that deployment is really successful and at the same time chaincode init method returns no error prints in the chaincode running window. So performing next step ` send an invoke ` after restarting chaincode fails with the message as put by Sneha ` Error: Error endorsing chaincode: rpc error: code = 2 desc = Error deploying chaincode: Failed to launch chaincode spec(Failed to init chaincode(handler not found for chaincode mycc)) ` . And the main reason I see from logs, the Orderer Service itself failed to pass the Deploy Transaction back to the Peer thus actually completing the deployment cycle of Chaincode. Following is the error seen in the orderer logs. ` grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 172.18.0.2:7050->172.18.0.4:38084: write: broken pipe" `

muralisr
2017-01-14 21:41
so

muralisr
2017-01-14 21:41
@rahulhegde you are using docker … and the instructions just posted are for running in vagrant

rahulhegde
2017-01-14 21:43
yes - running using docker, does it matter @muralisr

muralisr
2017-01-14 21:43
the instructions would have to be modified a bit

muralisr
2017-01-14 21:43
using docker container ids and `docker inspect <container id>` we can get IP addresses for `peer` and `orderer`

rahulhegde
2017-01-14 21:44
yes - this is taken care.

muralisr
2017-01-14 21:44
the CLI commands would have to be modified to point to those addresses

muralisr
2017-01-14 21:44
so for example

muralisr
2017-01-14 21:44
`CORE_CHAINCODE_MODE=dev peer chaincode deploy -n mycc -c '{"Args":["init","a","100","b","200"]}’` would change to

muralisr
2017-01-14 21:44
`CORE_PEER_ADDRESS=<peer ip>:<exported peer port> CORE_CHAINCODE_MODE=dev peer chaincode deploy -n mycc -c '{"Args":["init","a","100","b","200"]}’`

muralisr
2017-01-14 21:45
actually no

muralisr
2017-01-14 21:45
you’d also need to orderer address...

muralisr
2017-01-14 21:46
`CORE_PEER_ADDRESS=<peer ip>:<exported peer port> CORE_COMMITTER_LEDGER_ORDERER=<orderer ip>:<exporteded orderer port> CORE_CHAINCODE_MODE=dev peer chaincode deploy -n mycc -c '{"Args":["init","a","100","b","200"]}’`

muralisr
2017-01-14 21:46
and finally

rahulhegde
2017-01-14 21:47
yes Murali. Connect-a-thon images had the docker-composer file and had the YML file pre-configured.

muralisr
2017-01-14 21:48
and you are running `peer chaincode deploy` from vagrant ?

rahulhegde
2017-01-14 21:48
So Peer, Orderer and Cop images are pre-configured. The additional step run are the one - you provided. This is also run using the actual peer IP:Port

muralisr
2017-01-14 21:48
or from another docker container

rahulhegde
2017-01-14 21:49
Everything is from Docker Container.

rahulhegde
2017-01-14 21:50
Also - I have run the same setup on the AWS instance hosting a Linux RHEL VM. I did see ` grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 172.18.0.2:7050->172.18.0.4:38084: write: broken pipe" ` but the frequent of these messages is very very less.

rahulhegde
2017-01-14 21:50
So on AWS Linux RHEL instance - I was able to run my custom chaincode (Deploy + Invoke) and also with 2 PEER setup.

rahulhegde
2017-01-14 21:51
This problem aggravates very much on the environment which is hosted on Intranet (our development boxes).

rahulhegde
2017-01-14 21:52
I hope we are now sync?

rahulhegde
2017-01-14 21:52
Our internal intranet hosted environment are also RHEL.

muralisr
2017-01-14 21:57
@rahulhegde I’m not sure of all the dynamics here, but I’d say first step is to make sure the various containers can talke to each other and the envs (the `CORE_…` envs) are setup correctly to point to various processes

rahulhegde
2017-01-14 22:02
@muralisr @garisingh My understanding the setup w.r.t. IP, Port and ENV for DEV mode run is all correct. Like if I restart Peer, I do see a communication happening between Peer <--> Orderer successfully. However when a Transaction is sent for committing to the Ledger (in this case Deploy Transaction as per our scenario described), Orderer gets the correct IP of the Peer but the Port used is completely different and it gives the gRPC error. This is tried by the Orderer with correct IP but a increasing Port number.

rahulhegde
2017-01-14 22:04
How does the Orderer get the Peer endpoint information for communication - is it at the start-up Peer talks to the Orderer and registers this information?

muralisr
2017-01-14 22:32
it is the Peer who opens up communication with the oredre

muralisr
2017-01-14 22:33
so orderer does not have to know “endpoint” information of the peer

muralisr
2017-01-14 22:34
@rahulhegde it does sound like a configuration / setup issue (as opposed to a correctly setup env but failing sporadically) … I could be wrong of course (for example a flaky network might cause certain issues)

muralisr
2017-01-14 22:35
we’d need proper docs (for example, if you are using docker compose the composition files) to understand what’s happening

rahulhegde
2017-01-14 23:05
@muralisr - v1.0 arch setup Peer, Cop and Orderer Images used from ` https://github.com/IBM-Blockchain/connectathon ` Docker composer - ` https://github.com/rahulhegde/playtime/blob/master/docker-compose.zip ` Sample Chaincode - ` https://github.com/rahulhegde/learn-chaincode/tree/master/start ` Over above we have followed the steps provided by you to run the custom chaincode in DEV mode. I can also setup a screen share to show you the setup and error.

rahulhegde
2017-01-14 23:27
` invoke ` for the custom chain code prints the key before updating the key with the new value. Logs from Orderer ` [21:19:47.003] deliver.go:121: [DEBUG] Room for more blocks, activating channel 2017/01/14 21:19:47 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 172.18.0.2:7050->172.18.0.4:38072: write: broken pipe" 2017/01/14 21:19:47 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 172.18.0.2:7050->172.18.0.4:38076: write: broken pipe" 2017/01/14 21:19:48 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 172.18.0.2:7050->172.18.0.4:38084: write: broken pipe" [21:19:49.300] broadcast.go:125: [DEBUG] Batch timer expired, creating block [21:19:49.300] ramledger.go:171: [DEBUG] Sending signal that block 6 has a successor [21:19:49.300] deliver.go:121: [DEBUG] Room for more blocks, activating channel ` It gets the error first and then the Block gets passed to the Peer- somehow it is able to send it to Peer. I can see from the next 'invoke', world-state ledger contains updated value. ` [22:15:28.489] deliver.go:78: [DEBUG] Received acknowledgement from client [22:15:28.489] deliver.go:121: [DEBUG] Room for more blocks, activating channel 2017/01/14 22:20:44 grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 172.18.0.2:7050->172.18.0.4:38096: write: broken pipe" [22:21:02.431] broadcast.go:125: [DEBUG] Batch timer expired, creating block [22:21:02.432] ramledger.go:171: [DEBUG] Sending signal that block 7 has a successor [22:21:02.432] deliver.go:121: [DEBUG] Room for more blocks, activating channel [22:21:11.717] broadcast.go:125: [DEBUG] Batch timer expired, creating block ` Another snapshot at a different time.

garisingh
2017-01-14 23:34
the connection between the peer(s) and the orderer seem to be breaking. Do you see anything in the peer logs? I assume that `172.18.0.2:7050` is the orderer?

garisingh
2017-01-14 23:36
The "random" ports you see are the ephemeral ports used by the peer on its end when creating the connection to the orderer. The GRPC connection is full duplex (meaning either side can initiate sending information) - so the low level GRPC error is misleading - it trying to send data over the existing connection which appears to be broken

rahulhegde
2017-01-14 23:42
Yes the logs put are from the Orderer having endpoint ` 172.18.0.2:7050 ` , I don't see any error in the log of the 1-Peer setup environment having endpoint configured as ` 172.18.0.4:7051 `

muralisr
2017-01-14 23:47
@rahulhegde I need to go in a bit but have about 15 mins or so if you want to do a screenshare or google hangout

rahulhegde
2017-01-14 23:49
@muralisr I will pass the screenshare detail as direct message.

garisingh
2017-01-14 23:49
the peer is definitely connecting / reconnecting IMHO

muralisr
2017-01-14 23:51
yeah.. thinking some (flaky) network issue ?

rahulhegde
2017-01-15 01:26
@muralisr @garisingh Had a call with Murali (thanks for your time) and concluded there is no issue with the setup between peer and orderer. As suggested by Murali, I will post this problem on the #fabric-consensus-dev so this can be picked by you with the Consensus team for suggestion of any quick workaround.

ingcr3at1on
2017-01-15 18:11
has joined #fabric

rahulhegde
2017-01-15 23:30
@muralisr @garisingh as https://jira.hyperledger.org/secure/attachment/10378/peerchaincodedev_in_1.0.txt for chaincode running DEV mode, do we have steps to try to launch chaincode in non-dev or production mode? If I see the orderer logs of connect-a-thon setup done on our intranet (chaincode running in non-dev mode), for >20 blocks it hasn't thrown gRPC error.

muralisr
2017-01-15 23:33
@rahulhegde I’m not near laptop but these attachments are in you look in JIRA item 37 (fab-37)

muralisr
2017-01-15 23:34
there should be one for non-dev mode too… something like “skeleton end to end flow”

rahulhegde
2017-01-15 23:38
Let me check

rahulhegde
2017-01-15 23:41
Q: Peer CLI use of -p and installing using 'go get' isn't deprecated for v1.0? Q: if -p option is supported - can I pass a local path to the chaincode source code?

rahulhegde
2017-01-15 23:53
I tried the non-dev mode with connect-a-thon image of PEER and it dies down during ` go get ` ``` 23:52:19.396 [golang/hash] getCodeFromHTTP -> DEBU 010 getCodeFromHTTP http://github.com/rahulhegde/learn-chaincode/start 23:52:19.396 [golang/hash] getCodeFromHTTP -> DEBU 011 go get http://github.com/rahulhegde/learn-chaincode/start 23:52:28.835 [golang/hash] hashFilesInDir -> DEBU 012 hashFiles /opt/gopath/_usercode_/848482885/src/github.com/rahulhegde/learn-chaincode/start 23:52:30.629 [container] WriteGopathSrc -> INFO 013 rootDirectory = /opt/gopath/src 23:52:30.629 [container] WriteFolderToTarPackage -> INFO 014 rootDirectory = /opt/gopath/src panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x89f694] goroutine 1 [running]: panic(0xa83500, 0xc420016070) /opt/go/src/runtime/panic.go:500 +0x1a1 http://github.com/hyperledger/fabric/core/container/util.WriteFolderToTarPackage.func1(0xc4201a23b0, 0xf, 0x0, 0x0, 0x109ec20, 0xc420149320, 0xc420149201, 0xc4201492f0) /opt/gopath/src/github.com/hyperledger/fabric/core/container/util/writer.go:65 +0xa4 path/filepath.Walk(0xc4201a23b0, 0xf, 0xc4201492f0, 0xb41d07, 0x1) /opt/go/src/path/filepath/path.go:396 +0x8b http://github.com/hyperledger/fabric/core/container/util.WriteFolderToTarPackage(0xc4201d7200, 0xc4201a23b0, 0xf, 0xc4201492c0, 0x2c, 0xc42014fbf0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/core/container/util/writer.go:96 +0x1b2 http://github.com/hyperledger/fabric/core/container/util.WriteGopathSrc(0xc4201d7200, 0x7ffce0903cdb, 0x2b, 0x120, 0x108) /opt/gopath/src/github.com/hyperledger/fabric/core/container/util/writer.go:112 +0x1de http://github.com/hyperledger/fabric/core/chaincode/platforms/golang.writeChaincodePackage(0xc4201dbce0, 0xc4201d7200, 0xc420096300, 0x80) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/platforms/golang/package.go:79 +0x7ab http://github.com/hyperledger/fabric/core/chaincode/platforms/golang.(*Platform).WritePackage(0x10df9d8, 0xc4201dbce0, 0xc4201d7200, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/platforms/golang/platform.go:84 +0x60 http://github.com/hyperledger/fabric/core/container.GetChaincodePackageBytes(0xc4201dbce0, 0x0, 0x0, 0xc420286830, 0x1, 0x1) /opt/gopath/src/github.com/hyperledger/fabric/core/container/vm.go:97 +0x1be http://github.com/hyperledger/fabric/core.GetChaincodeBytes(0x7f12ced2e800, 0xc420016228, 0xc4201dbce0, 0x7f12ced2e800, 0xc420016228, 0x539d9a) /opt/gopath/src/github.com/hyperledger/fabric/core/devops.go:132 +0x10b http://github.com/hyperledger/fabric/peer/chaincode.deploy(0x1094400, 0xb47300, 0xc420157b20, 0x4b1616) /opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/deploy.go:55 +0xba http://github.com/hyperledger/fabric/peer/chaincode.chaincodeDeploy(0x1094400, 0xc4201d8ae0, 0x0, 0x6, 0x0, 0x9) /opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/deploy.go:105 +0x2b http://github.com/hyperledger/fabric/peer/chaincode.glob..func1(0x1094400, 0xc4201d8ae0, 0x0, 0x6, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/chaincode/deploy.go:42 +0x49 http://github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0x1094400, 0xc4201d8a20, 0x6, 0x6, 0x1094400, 0xc4201d8a20) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:599 +0x234 http://github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x10961c0, 0x7, 0xc4201d3470, 0x2c) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:689 +0x367 http://github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute(0x10961c0, 0xc4201d3470, 0x2c) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:648 +0x2b main.main() /opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:139 +0x692 ```

muralisr
2017-01-16 01:08
@rahulhegde I guess you were trying remote ?

rahulhegde
2017-01-16 01:25
@muralisr didn't get the remote note. I am trying to exec to the peer docker container and then executing the deploy using -path to github.

muralisr
2017-01-16 01:26
@rahulhegde I’m trying to get hold of the connectathon source

muralisr
2017-01-16 01:27
did you get a chance to try with master ?

rahulhegde
2017-01-16 01:28
not yet from master.

rahulhegde
2017-01-16 01:29
my recent run on marble application shows that peer running chaincode in non-dev mode; the orderer of the connect-a-thon never threw a gRPC error

rahulhegde
2017-01-16 01:30
if I can complete the launching of my 'custom' chaincode via non-dev mode, I think at least I should proceed with chaincode development.

muralisr
2017-01-16 01:31
for non-dev mode just have to remove the —peer-chaincodedev flag in the peer

muralisr
2017-01-16 01:32
and not use the CORE_CHAINCODE_MODE=dev flag in the deploy / invoke commands

rahulhegde
2017-01-16 01:32
how will the peer get the path of the chaincode when run via Peer CLI?

muralisr
2017-01-16 01:32
it should be in the gopath in the CLI

muralisr
2017-01-16 01:33
however I have not run in docker env recently

rahulhegde
2017-01-16 01:33
-p $GOPATH/src/custom-chaincode ?

rahulhegde
2017-01-16 01:34
this path will hold the actual chaincode source file

muralisr
2017-01-16 01:34

rahulhegde
2017-01-16 01:34
But I am stuck with the segmentation fault as put above.

muralisr
2017-01-16 01:34
what is your CLI command ?

rahulhegde
2017-01-16 01:35
peer chaincode deploy -n mycc -p https://github.com/rahulhegde/learn-chaincode/start -c '{"Args":["init","100"]}'

muralisr
2017-01-16 01:35
do you have the source locally ?

muralisr
2017-01-16 01:35
in your gopath

muralisr
2017-01-16 01:36
ie under $GOPATH/rahulhegde/learn-chaincode/start ?

muralisr
2017-01-16 01:36
if you do

rahulhegde
2017-01-16 01:36
Let me check now - I think I didn't expose from the container.

muralisr
2017-01-16 01:36
try `peer chaincode deploy -n mycc -p http://github.com/rahulhegde/learn-chaincode/start -c '{"Args":["init","100"]}’`

muralisr
2017-01-16 01:36
yes

muralisr
2017-01-16 01:36
export the volume and try it

muralisr
2017-01-16 01:37
again, I have not tried in peer running in docker

muralisr
2017-01-16 01:37
if you can try in master it’ll be be easier to debug these issues

rahulhegde
2017-01-16 01:40
yes - I will try now exposing the volume. Also, I have compiled Peer and Orderer from master branch - I can give try on this too as per u r steps but not using Vagrant due to VM issue.

rahulhegde
2017-01-16 01:41
BTW - why do u need to expose chaincode source if Peer CLI is trying to do ` go get ` from network?

rahulhegde
2017-01-16 01:55
@muralisr - good part i didn't get segmentation fault after volume mapping however the below error ``` 01:50:07.421 [golang/hash] getCodeFromFS -> DEBU 010 getCodeFromFS http://github.com/rahulhegde/learn-chaincode/start 01:50:07.421 [golang/hash] hashFilesInDir -> DEBU 011 hashFiles /opt/gopath/src/github.com/rahulhegde/learn-chaincode/start 01:50:09.106 [container] WriteGopathSrc -> INFO 012 rootDirectory = /opt/gopath/src 01:50:09.106 [container] WriteFolderToTarPackage -> INFO 013 rootDirectory = /opt/gopath/src 01:50:14.680 [msp] GetManager -> INFO 014 Returning MSP manager %!p(msp.peerMspManagerImpl={map[DEFAULT:0xc4201dfa70] PeerMSPManager true}) 01:50:14.680 [msp] GetSigningIdentity -> INFO 015 Looking up MSP with ID {DEFAULT} 01:50:14.680 [msp] GetSigningIdentity -> INFO 016 Obtaining signing identity for &{{DEFAULT} PEER} 01:50:14.766 [msp] Sign -> INFO 017 Signing message Error: Error endorsing chaincode: rpc error: code = 2 desc = Failed to init chaincode(handler not found for chaincode mycc) ```

muralisr
2017-01-16 01:56
@rahulhegde .. what do you see in peer.log (I assume you are running in docker )

rahulhegde
2017-01-16 02:01
Just pasting the last logs where it shows error. Yes Murali inside the docker. ``` 01:58:59.269 [chaincode] beforeCompletedEvent -> DEBU 156 [1f122cf2]beforeCompleted - not in ready state will notify when in readystate 01:58:59.269 [chaincode] enterReadyState -> DEBU 157 [1f122cf2]Entered state ready 01:58:59.269 [chaincode] notify -> DEBU 158 notifying Txid:1f122cf2-1f16-4546-9a49-e8c1961c3c54 01:58:59.295 [chaincode] Deploy -> DEBU 159 user runs chaincode, not deploying chaincode 01:58:59.311 [chaincode] sendInitOrReady -> DEBU 15a handler not found for chaincode mycc 01:58:59.311 [chaincode] Launch -> ERRO 15b sending init failed(handler not found for chaincode mycc) 01:58:59.311 [container] lockContainer -> DEBU 15c waiting for container(dev-peer-01-mycc) lock 01:58:59.311 [container] lockContainer -> DEBU 15d got container (dev-peer-01-mycc) lock 01:58:59.312 [dockercontroller] stopInternal -> DEBU 15e Stop container dev-peer-01-mycc(No such container: dev-peer-01-mycc) 01:58:59.313 [dockercontroller] stopInternal -> DEBU 15f Kill container dev-peer-01-mycc (No such container: dev-peer-01-mycc) 01:58:59.314 [dockercontroller] stopInternal -> DEBU 160 Remove container dev-peer-01-mycc (No such container: dev-peer-01-mycc) 01:58:59.314 [container] unlockContainer -> DEBU 161 container lock deleted(dev-peer-01-mycc) 01:58:59.314 [chaincode] Launch -> DEBU 162 sending init completed 01:58:59.314 [chaincode] Launch -> DEBU 163 LaunchChaincode complete ```

rahulhegde
2017-01-16 02:03
My understanding - successful deployment will spin a new docker container running the chaincode.

muralisr
2017-01-16 02:03
`user runs chaincode, not deploying chaincode`

muralisr
2017-01-16 02:03
sounds like `—peer-chaincodedev` is still there ?

rahulhegde
2017-01-16 02:04
yes - :disappointed: let me fix that.

muralisr
2017-01-16 02:04
ok

muralisr
2017-01-16 02:05
also make sure not to use CORE_CHAINCODE_MODE in the CLI commands

rahulhegde
2017-01-16 02:06
yes - none of the 3 ENV will be used.

rahulhegde
2017-01-16 02:11
From Peer Logs ``` 02:08:08.244 [container] lockContainer -> DEBU 16b got container (dev-peer-01-mycc) lock 02:08:10.884 [dockercontroller] deployImage -> ERRO 16c Error building images: Tag x86_64-0.7.0-snapshot-b0e902e not found in repository http://docker.io/hyperledger/fabric-ccenv 02:08:10.884 [dockercontroller] deployImage -> ERRO 16d Image Output: ******************** Step 1 : FROM hyperledger/fabric-ccenv:x86_64-0.7.0-snapshot-b0e902e Pulling repository http://docker.io/hyperledger/fabric-ccenv ******************** ``` I received ccenv as part of connect-a-thon image set, should I tag that image with the above required tag OR is the way I can say use ` hyperledger/fabric-ccenv:latest `? Does the above behavior get influenced by core.yml configuration ``` golang: # This is the basis for the Golang Dockerfile. Additional commands will # be appended depedendent upon the chaincode specification. Dockerfile: | FROM hyperledger/fabric-ccenv:$(ARCH)-$(PROJECT_VERSION) COPY src $GOPATH/src WORKDIR $GOPATH ```

rahulhegde
2017-01-16 02:14
My master compiled branch also contains ccenv but I don't think I should use it (by retagging the below) ``` hyperledger/fabric-ccenv latest 96b2854a1654 2 weeks ago 1.264 GB hyperledger/fabric-ccenv x86_64-0.7.0-snapshot-defb65b 96b2854a1654 2 weeks ago 1.264 GB ```

rahulhegde
2017-01-16 02:36
@muralisr I see below - close to what is mentioned in the ` test with skeletal ` document ``` 02:29:51.479 [container] lockContainer -> DEBU 30a got container (dev-peer-01-mycc) lock 02:29:51.481 [chaincode] processStream -> ERRO 30b Error handling chaincode support stream: stream error: code = 1 desc = "context canceled" 02:29:51.481 [chaincode] deregisterHandler -> DEBU 30c Deregister handler: mycc 02:29:51.481 [chaincode] deregisterHandler -> DEBU 30d Deregistered handler with key: mycc 02:29:51.604 [dockercontroller] stopInternal -> DEBU 30e Stopped container dev-peer-01-mycc 02:29:51.605 [dockercontroller] stopInternal -> DEBU 30f Kill container dev-peer-01-mycc (API error (500): {"message":"Cannot kill container dev-peer-01-mycc: Container 7141538196d22443d7611daeab0fa17b4ced5c06b25937729845c1124fb19201 is not running"} ) ``` My cc-env ~ 1.4G and the peer log scroll has stopped with above message but my Peer CLI logs are scrolling - not sure what is happening

rahulhegde
2017-01-16 03:19
Thanks @muralisr. I am able to see the chaincode spin in a different docker container now and have run almost 20 invoke w/o any gRPC error. From this activity, it looks there is some defect on PEER when run in peerchaincode dev mode for connect-a-thon image. I need to try the same on my intranet and have few questions on this, which I will ask you!!! Thank You.

synblockchainteam
2017-01-16 09:20
Decrypting payload - Please let us know how to decrypt payload data using certificate (Ecert/TCert). Can anyone answer this?

vadim
2017-01-16 10:30
has joined #fabric

arnaud
2017-01-16 11:35
@garisingh the good news is that I was indeed able to build cop on Windows, natively

arnaud
2017-01-16 11:35
the bad news is that the unit-tests don't pass, is that expected? that seems true in Vagrant just the same so I don't think this is Windows specific

arnaud
2017-01-16 11:54
it seems that the problem comes from trying to rerun the same test

arnaud
2017-01-16 11:54
or tests

arnaud
2017-01-16 11:58
yup

arnaud
2017-01-16 11:58
if I rm testdata/cop.db and rerun the test it passes

garisingh
2017-01-16 12:06
hmm - ironically I am getting a lint error now

arnaud
2017-01-16 12:06
so here is the deal, tests pass if I delete the db between each package

arnaud
2017-01-16 12:08
so "gocov test $PKGS" fails, but "for i in $PKGS;do rm -f testdata/cop.db; gocov test $i;done" works

arnaud
2017-01-16 12:08
apparently it has to do with trying to enroll the same user multiple times

arnaud
2017-01-16 12:09
make lint works for me

garisingh
2017-01-16 12:21
did you run `make unit-tests`

arnaud
2017-01-16 12:23
yes

garisingh
2017-01-16 12:25
past the lint error - now running `make unit-tests` twice in a row

arnaud
2017-01-16 12:25
I can't even pass it once

garisingh
2017-01-16 12:26
I passed once

garisingh
2017-01-16 12:26
(I'm on OSX as that's what I have been using so just want to stay consistent)

arnaud
2017-01-16 12:26
for me it fails on TestAllClient

arnaud
2017-01-16 12:27
I'm running natively on Windows

arnaud
2017-01-16 12:28
which is part of the lib test

garisingh
2017-01-16 12:28
right - I just want to make sure that nothing that was working is broken :wink: although the lint error is odd - I've seen it before but than it went away

arnaud
2017-01-16 12:29
I'll try again on Vagrant to see what I get

garisingh
2017-01-16 12:29
I'm going to check in a fix anyway - the lint error actually showed a poor line of code :wink:

arnaud
2017-01-16 12:29
in any case we're not far of having it functioning on Windows

garisingh
2017-01-16 12:30
I ran the tests twice in a row with no issues. my best guess is that we have a Unix specific file command in the code

arnaud
2017-01-16 12:30
yeah...

arnaud
2017-01-16 12:31
there is also a test that fails: --- FAIL: TestMakeFileAbs (0.00s) util_test.go:235: Absolute of file=/a/b/c with dir= expected /a/b/c but was C:\a\b\c util_test.go:235: Absolute of file=c with dir=/a/b expected /a/b/c but was C:\a\b\c util_test.go:235: Absolute of file=../c with dir=/a/b expected /a/c but was C:\a\c FAIL FAIL http://github.com/hyperledger/fabric-cop/util 0.972s

arnaud
2017-01-16 12:31
typical unix specific code :slightly_smiling_face:

arnaud
2017-01-16 12:32
I'll see what needs to be done for that one

arnaud
2017-01-16 12:32
there should be a Go function that allows to deal with that difference

garisingh
2017-01-16 12:52
you can probably use `filepath.Clean()` around the expected result in the test

arnaud
2017-01-16 13:38
that doesn't do, but filepath.Abs() on the expected value does the trick

garisingh
2017-01-16 13:43
yeah - I found that too

garisingh
2017-01-16 13:43
unfortunately, I was trying to avoid having to deal with the error return :wink:

arnaud
2017-01-16 14:12
you can ignore the error :slightly_smiling_face:

arnaud
2017-01-16 14:12
which makes it work even for the special case of ""

arnaud
2017-01-16 14:13
a bit hacky but where is the fun otherwise? :wink:

arnaud
2017-01-16 14:13
one has to leave room for more bugs to crawl

arnaud
2017-01-16 14:14
the unit tests don't pass on vagrant either

arnaud
2017-01-16 14:14
but for different reasons

arnaud
2017-01-16 14:14
I fixed one - in the tests

arnaud
2017-01-16 14:23
@garisingh is it intentional that the server_test.go cleans up cop.db but not client_test.go?

arnaud
2017-01-16 14:24
I don't know how that works on Mac

arnaud
2017-01-16 14:24
in my case, whether on Windows or vagrant the tests trip over reusing the db

keithsmith
2017-01-16 14:26
@arnaud It is not intentional. It should be cleaned up. I've added cleanup code in client_test.go in multiple change sets but somehow keeps getting removed. (I just saw this conversation on fabric)

arnaud
2017-01-16 14:27
hi keith, I actually thought I was on #fabric-cop, my bad

arnaud
2017-01-16 14:27
I'll switch channel

nickmelis
2017-01-16 14:43
is anyone familiar with java chaincode and tables?

nickmelis
2017-01-16 14:44
(may be similar to go chaincode though)

nickmelis
2017-01-16 14:44
is there a way to select more than one rows using some criteria rather than only getting one single row by key?

nickmelis
2017-01-16 14:48
actually I see the go chaincode stub has a getRows method, whereas the java one doesn't

thojest
2017-01-16 15:06
question: when i deploy chaincode in non-dev mode then this deploy returns a cryptic hash which i have to use for invokes

thojest
2017-01-16 15:07
is there a more elegant version to invoke or query the chaincode without using this superlong hash for addressing the chaincode ?

vadim
2017-01-16 15:08
try using the —name flag

vadim
2017-01-16 15:08
peer chaincode deploy -n “something"

thojest
2017-01-16 15:08
i though when using non dev mode you cannot use -n ?

vadim
2017-01-16 15:08
I’m not aware of such limitation

thojest
2017-01-16 15:09
i ll try it thanks

thojest
2017-01-16 15:12
hmm i think -n only works for node with `--peer-chaincodedev`

vadim
2017-01-16 15:13
it’s probably on 0.6.1

thojest
2017-01-16 15:13
yepp im using v0.6

vadim
2017-01-16 15:13
seems that the last fabric does allow using —name in prod mode

thojest
2017-01-16 15:14
at least this cryptic hash stays the same in every deployment :slightly_smiling_face: im fine with that

vadim
2017-01-16 15:14
as long as you dont change your chaincode

thojest
2017-01-16 15:14
ok, nice to know

thojest
2017-01-16 16:11
is there anywhere an example for how the communication between a nodejs app and the chaincode works using hfc sdk

thojest
2017-01-16 16:11
?

thojest
2017-01-16 16:11
specifically, how do i call a function of the chaincode in the nodejs app

vadim
2017-01-16 16:16
I could suggest to read the end-to-end test found in the fabric-sdk-node repo: https://github.com/hyperledger/fabric-sdk-node/blob/master/test/unit/end-to-end.js

vadim
2017-01-16 16:17
However, I’m not sure whether it would work with 0.6

vadim
2017-01-16 16:19

thojest
2017-01-16 16:40

thojest
2017-01-16 16:41
@vadim but thx anyway

hinoue
2017-01-16 16:56
has joined #fabric

marcusvcs
2017-01-16 19:09
has joined #fabric

yashgt
2017-01-16 20:38
*Who ensures endorsement results match in Fabric 1.0?* If the client requests endorsements from 3 Endorsing Peers, and they all run the chaincode and provide the response, does the client have to check whether all the responses match, before sending the endorsements to the Ordering Service? Or does the client only have to check whether or not enough endorsements have arrived? Does the SDK perform these checks or does the client have execute custom code to perform these checks?

markparz
2017-01-16 21:30
@yashgt …. @muralisr can confirm, the SDK would check to verify you have the proper number of signed endorsements based on the policy you set. I don’t know what you mean by “whether all the responses match”.

silliman
2017-01-16 22:12
@markparz I don't know the answer to this myself, but I suspect that what @yashgt means is this- Do I, the client, have to check if the values in the ReadSets and/or ReadWriteSets that are returned from each endorsing peer in the Transaction proposal response are identical, or will the SDK do this for me "under the covers" ?

julio
2017-01-17 00:45
Hi. To anyone who knows, is (or will) there be a beta release for v1?

yashgt
2017-01-17 01:01
@markparz, @silliman has described my question accurately.

muralisr
2017-01-17 01:04
@yashgt the final “validation” of endorsement happens on the peer itself at commit time using the endorsement policy for the chaincode for each TX when the block with the TX reaches the peer

muralisr
2017-01-17 01:05
the application using the SDK can perform validations too (but they are not expected and cannot in general do Read/Write set validation as these are not at the “application” level)

muralisr
2017-01-17 01:09
as @markparz pointed out the SDK can do endorsement checks too (and probably a good thing if it does to save work on the aforementioned commit-time validation)

ghaskins
2017-01-17 02:35
@muralisr I took the above question not so much as it imply the SDK can or should perform validation on the output set itself, as much as a question of whether it (the client or the SDK) is comparing the consistency of the outputs

ghaskins
2017-01-17 02:35
thats something I would be curious about as well

ghaskins
2017-01-17 02:36
e.g. can/should the client/SDK ensure that either all or "enough" endorsers derived the same RWS

warong
2017-01-17 07:53
has joined #fabric

karthik
2017-01-17 08:03
Is there a limit to number of nodes participating in a network(both development and production)? If yes, how many?

billykwok
2017-01-17 08:43
has joined #fabric

thojest
2017-01-17 09:08
question: where can i find information about functions in hfc sdk

thojest
2017-01-17 09:08
so to say an api description

thojest
2017-01-17 09:09
afaik in the official nodejs repository many links do not work anymore

nickmelis
2017-01-17 09:22
what’s the advantage of writing into the state instead of storing a map in the chaincode itself?

vadim
2017-01-17 09:26
it won’t be in the blockchain if you store it in the chaincode

thojest
2017-01-17 09:28
found it it is in the doc folder :smile: :smile:

thojest
2017-01-17 10:27
when using hyperledger without security enabled i can deploy and invoke without referring to a special user

thojest
2017-01-17 10:27
is this also possible using hfc sdk

thojest
2017-01-17 10:28
so that i can use `deploy()` without having a user?

thojest
2017-01-17 10:45
so can i use hfc sdk without the membersrvc servcie

dsanchezseco
2017-01-17 12:03
is someone playing with Certs attributes?


dsanchezseco
2017-01-17 12:08
and the firsts questions i have are, 1. it says the attributes are validated by the ACA, but then on the example are sended on the json? are still validated againts the ACA? if they are different are them discarded? I suppose the attributes should be stored on the yaml of the memberserv along with the enrollID/secret, right? 2. can i use them to gather the identity of the invoker of the chaincode to have access control instead of based on atributtes based on identity?

xixuejia
2017-01-17 12:29
Hi all, I want to update my chaincode from v0.5 to v0.6, how can I migrate data(blocks, state) ? Is there any best practice or existing tool to do that?

vadim
2017-01-17 12:34
@dsanchezseco you can get identity in chaincode (caller cert) by calling stub.getCallerCertificate()

dsanchezseco
2017-01-17 12:35
but does change through calls right?

vadim
2017-01-17 12:35
if you use tcerts

dsanchezseco
2017-01-17 12:35
and how to change to ecerts?

vadim
2017-01-17 12:36
just sign it with ecert

vadim
2017-01-17 12:36
but ecert will not have attributes

dsanchezseco
2017-01-17 12:37
ok thanks!


dsanchezseco
2017-01-17 12:39
yeah, i've already read all those

mtnieto
2017-01-17 12:40
has joined #fabric

muralisr
2017-01-17 12:57
@ghaskins `can/should the client/SDK ensure that either all or "enough" endorsers derived the same RWS` .. absolutely, yes.

muralisr
2017-01-17 12:58
in other words, the responses should be identical

muralisr
2017-01-17 12:58
and endorsed

ghaskins
2017-01-17 12:59
:+1:

thojest
2017-01-17 13:52
hey guys im trying to deploy a chaincode using hfc sdk

thojest
2017-01-17 13:52
this is the error im getting

thojest
2017-01-17 13:53
`request = {"fcn":"init","args":["50","300"],"chaincodePath":"settlement/"} error = {"error":{"code":2,"metadata":{"_internal_repr":{}}},"msg":"Error: sql: no rows in result set"} `

thojest
2017-01-17 13:53
can anyone help me, what am i doing wrong

thojest
2017-01-17 13:54
i try to deploy with the following function

thojest
2017-01-17 13:54
`function deploychaincode(err, deployuser) { var deployRequest = { fcn: "init", args: ["50", "300"], chaincodePath: "settlement/" }; var deployTx = deployuser.deploy(deployRequest); deployTx.on("complete", function(results){ chaincodeID = results.chaincodeID; console.log("\nChaincode ID: " + chaincodeID); console.log(util.format("\n Successfully deployed chaincode\nrequest = %j\n response = %j", deployRequest, results)); fs.writeFileSync(chaincodeIDPath, chaincodeID); }); deployTx.on("error", function(err) { console.log(util.format("\nFailed to deploy chaincode\nrequest = %j\n error = %j", deployRequest, err)); }); }`

vadim
2017-01-17 13:57
are you able to deploy your chaincode over console?

thojest
2017-01-17 13:57
yes

thojest
2017-01-17 13:58
i think it has to do with my deploy request

thojest
2017-01-17 13:58
is chaincodepath absolute or relative or dependent on go path ?

vadim
2017-01-17 13:58
it should be relative to gopath

thojest
2017-01-17 13:58
do i need chaincodeid or chaincodename?

vadim
2017-01-17 13:59
I think it should be generated

vadim
2017-01-17 13:59

thojest
2017-01-17 13:59
do i need certificatepath even when security is off ?

thojest
2017-01-17 13:59
yeah thats exactly what im looking at

vadim
2017-01-17 14:00
I think it must be more or less the same parameters you use in console

thojest
2017-01-17 14:02
hmm how do i find out what this error means?

vadim
2017-01-17 14:04
you see any errors at peer?

thojest
2017-01-17 14:05
no unfortunately not

vadim
2017-01-17 14:14
just a guess: maybe the hfc incorrectly interprets the empty result from your chaincode init function

vadim
2017-01-17 14:14
try returning something there other than nil

thojest
2017-01-17 14:17
ok ill try that

thojest
2017-01-17 14:26
hmm unfortunately it does not work

thojest
2017-01-17 14:26
however i can successfully enroll and register users

thojest
2017-01-17 14:28
`test`

thojest
2017-01-17 14:29
is the deploy request

thojest
2017-01-17 14:29
var deployRequest = { fcn: "init", args: ["50", "300"], chaincodePath: "settlement" };

thojest
2017-01-17 14:29
is it correct or am i missing something

thojest
2017-01-17 14:29
this is the equivalent

thojest
2017-01-17 14:30
`peer chaincode deploy -c '{"Args": ["init","20", "30"]}' -p settlement`

thojest
2017-01-17 14:30
and it works

thojest
2017-01-17 14:39
i think that it has to do with my hfc version

thojest
2017-01-17 14:39
i remember having problems with this hfc interface before

thojest
2017-01-17 14:39
so im using hyperledger v0.6

thojest
2017-01-17 14:39
which hfc version do you recommend for this?

vadim
2017-01-17 14:44

thojest
2017-01-17 14:48
yeah and tested in all available versions

thojest
2017-01-17 14:48
but i found something...

thojest
2017-01-17 14:49
although im not using bluemix


thojest
2017-01-17 14:50
this seems to be the same or at least a similar problem

thojest
2017-01-17 14:50
maybe some uber dev-pros can help me here

thojest
2017-01-17 15:06
so first question would be, when deploying via hfc sdk do i have to include the `certificatePath` ?

thojest
2017-01-17 15:07
when security is turned off

thojest
2017-01-17 15:31
i think not

ibmdannywong
2017-01-17 15:41
@channe

alihendavi
2017-01-17 16:07
has joined #fabric

thojest
2017-01-17 16:25
got it working

thojest
2017-01-17 16:27
had to `rm /tmp/keyValStore/member.admin`

thojest
2017-01-17 16:39
so new question

thojest
2017-01-17 16:39
which hfc version do you recommend for hyperledger v0.6 ?

thojest
2017-01-17 16:58
again question: when using hfc sdk for chaincode deployment i have the impression that it does not recognize my GOPATH

thojest
2017-01-17 16:59
however using `echo $GOPATH` shows me that it is set

thojest
2017-01-17 16:59
where do i have to set the GOPATH correctly for hfc sdk deploy chaincode to work?

thojest
2017-01-17 17:19
i think the problem is deployin chaincode in NON-dev mode using the hfc sdk

garisingh
2017-01-17 17:32
@thojest - definitely use the latest version of hfc available via npm - I think it's v0.6.5

garisingh
2017-01-17 17:35
it should recognize $GOPATH if its set. You can try doing `DEBUG=hfc node [your_app.js]`

garisingh
2017-01-17 17:36
you can of course always just print the output of `process.env['GOPATH']` as well in your Node program which is using the SDK

thojest
2017-01-17 17:42
@garsingh thx

thojest
2017-01-17 17:42
@garisingh to be specific i have the following problem

thojest
2017-01-17 17:43
18:39:31.092 [dockercontroller] deployImage -> ERRO 017 Error building images: The command '/bin/sh -c go install build-chaincode && cp src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chaincode $GOPATH/bin/b3ca6d9fd3c431e6e0744bd3d1500db858c7a5cb60499883c0e95165c9a879de' returned a non-zero code: 1 18:39:31.092 [dockercontroller] deployImage -> ERRO 018 Image Output: ******************** Step 1 : FROM hyperledger/fabric-baseimage ---> 778b7e6e8b67 Step 2 : COPY . $GOPATH/src/build-chaincode/ ---> Using cache ---> f24fd59fa43d Step 3 : WORKDIR $GOPATH ---> Using cache ---> 12c214b6b129 Step 4 : RUN go install build-chaincode && cp src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chaincode $GOPATH/bin/b3ca6d9fd3c431e6e0744bd3d1500db858c7a5cb60499883c0e95165c9a879de ---> Running in b2f18b58d422 src/build-chaincode/settlement.go:10:2: cannot find package "http://github.com/hyperledger/fabric/core/chaincode/shim" in any of: /opt/go/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOPATH) ******************** 18:39:31.665 [dockercontroller] deployImage -> ERRO 019 Error building images: The command '/bin/sh -c go install build-chaincode && cp src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chaincode $GOPATH/bin/b3ca6d9fd3c431e6e0744bd3d1500db858c7a5cb60499883c0e95165c9a879de' returned a non-zero code: 1 18:39:31.665 [dockercontroller] deployImage -> ERRO 01a Image Output: ******************** Step 1 : FROM hyperledger/fabric-baseimage ---> 778b7e6e8b67 Step 2 : COPY . $GOPATH/src/build-chaincode/ ---> Using cache ---> f24fd59fa43d Step 3 : WORKDIR $GOPATH ---> Using cache ---> 12c214b6b129 Step 4 : RUN go install build-chaincode && cp src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chaincode $GOPATH/bin/b3ca6d9fd3c431e6e0744bd3d1500db858c7a5cb60499883c0e95165c9a879de ---> Running in 046be90110d3 src/build-chaincode/settlement.go:10:2: cannot find package "http://github.com/hyperledger/fabric/core/chaincode/shim" in any of: /opt/go/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/shim (from $GOPATH) ******************** 18:39:31.665 [chaincode] Launch -> ERRO 01b launchAndWaitForRegister failed Error starting container: The command '/bin/sh -c go install build-chaincode && cp src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chaincode $GOPATH/bin/b3ca6d9fd3c431e6e0744bd3d1500db858c7a5cb60499883c0e95165c9a879de' returned a non-zero code: 1

thojest
2017-01-17 17:44
this is what i get when i try to deploy using hfc sdk

garisingh
2017-01-17 17:44
did you vendor the fabric source within your chaincode project?

thojest
2017-01-17 17:45
no sry, im feeling like an uber noob now :smile:

thojest
2017-01-17 17:45
could you explain what it is and why i do not have to do it when deploying via CLI

thojest
2017-01-17 17:59
ok found something that explains it

thojest
2017-01-17 17:59
so what is the reason behind it ?

cbf
2017-01-17 18:13
@thojest well, it is a long story;-)

cbf
2017-01-17 18:14
it has to do with the lifecycle of the creation for the chaincode's docker image

cbf
2017-01-17 18:15
if you deploy via the cli, then the binary has that context (the chaincode shim package in particular

cbf
2017-01-17 18:16
when you deploy with the sdk or REST API, then you need to ship all the bits

cbf
2017-01-17 18:17
frankly I would have preferred a model where we build a docker image and just point to a published docker registry entry

cbf
2017-01-17 18:18
of course then you need to deal with platform and architecture specific issues

thojest
2017-01-17 18:19
thx for the nice explanation

yashgt
2017-01-17 18:51
@muralisr to your response on whether SDK validates the endorsements, does it mean that the transaction is considered Endorsed if and only if "enough" number of endorsements are received *and* all the received endorsements match? If so the description in the 1.0 proposal should be updated to include both the criteria.

ghaskins
2017-01-17 19:34
@cbf @thojest I should also add, I think we can do better and I have ideas/plans on how

ghaskins
2017-01-17 19:34
But that is how it is today

cbf
2017-01-17 19:49
rhymes with main pool?

cbf
2017-01-17 19:49
@ghaskins ^^

ghaskins
2017-01-17 19:50
Heh, yes, though even outside of chaintool I think we can improve

cbf
2017-01-17 19:50
agree

shaggy_kp
2017-01-18 02:57
has joined #fabric

shaggy_kp
2017-01-18 03:05
I was running a fabric network locally using docker. I was attempting to delete my blockchain for testing purposes by navigating to the validating peer file system by using a command like docker exec -it substitute_container_name bash and deleting the /var/hyperledger/production directory. I initially deleted /var/hyperledger/production/db but I was still seeing my blockchain so deleted the /var/hyperledger/production directory. Now I can't startup my network, memberservices container starts up by the fabric peer does not. I get the below error:

shaggy_kp
2017-01-18 03:05
vp0_1 | 02:40:56.233 [crypto] Debugf -> DEBU 028 [validator.my_vp0] Storing TCA certificate for [my_vp0]... vp0_1 | 02:40:56.233 [crypto] Debug -> DEBU 029 [validator.my_vp0] Getting ECA client... vp0_1 | 02:40:56.234 [crypto] Debugf -> DEBU 02a [validator.my_vp0] Dial to addr:[membersrvc:7054], with serverName:[tlsca]... vp0_1 | 02:40:56.235 [crypto] Debug -> DEBU 02b [validator.my_vp0] TLS disabled... vp0_1 | 02:40:56.236 [crypto] Debug -> DEBU 02c [validator.my_vp0] Getting ECA client...done vp0_1 | 02:40:56.262 [crypto] Errorf -> ERRO 02d [validator.my_vp0] Failed invoking CreateCertficatePair [rpc error: code = 2 desc = Identity lookup error: sql: no rows in result set]. vp0_1 | 02:40:56.263 [crypto] Errorf -> ERRO 02e [validator.my_vp0] Failed getting enrollment certificate [id=my_vp0]: [rpc error: code = 2 desc = Identity lookup error: sql: no rows in result set] vp0_1 | 02:40:56.263 [crypto] Errorf -> ERRO 02f [validator.my_vp0] Failed retrieving enrollment data [rpc error: code = 2 desc = Identity lookup error: sql: no rows in result set]. vp0_1 | 02:40:56.264 [crypto] Errorf -> ERRO 030 [validator.my_vp0] Failed registering node crypto engine [rpc error: code = 2 desc = Identity lookup error: sql: no rows in result set]. vp0_1 | 02:40:56.264 [crypto] Errorf -> ERRO 031 [validator.my_vp0] Failed registering peer [my_vp0]: [rpc error: code = 2 desc = Identity lookup error: sql: no rows in result set] vp0_1 | 02:40:56.265 [crypto] Errorf -> ERRO 032 [validator.my_vp0] Failed registering [my_vp0]: [rpc error: code = 2 desc = Identity lookup error: sql: no rows in result set] vp0_1 | 02:40:56.265 [crypto] RegisterValidator -> ERRO 033 Failed registering validator [my_vp0] with name [my_vp0] [rpc error: code = 2 desc = Identity lookup error: sql: no rows in result set]. vp0_1 | Error: rpc error: code = 2 desc = Identity lookup error: sql: no rows in result set vp0_1 | Usage: vp0_1 | peer node start [flags] vp0_1 | vp0_1 | Flags: vp0_1 | --peer-chaincodedev Whether peer in chaincode development mode vp0_1 | vp0_1 | Global Flags: vp0_1 | --logging-level string Default logging level and overrides, see core.yaml for full syntax vp0_1 | --test.coverprofile string Done (default "coverage.cov") vp0_1 | -v, --version Display current version of fabric peer server vp0_1 | shaggykp_vp0_1 exited with code 1

shaggy_kp
2017-01-18 03:05
How do I fix this?

ghaskins
2017-01-18 03:13
@shaggy_kp I am not sure what is actually failing, but I suspect the persistence is caused by your composition

ghaskins
2017-01-18 03:13
try running "docker-compose down" (using any "-f" directives that are mirrorred from your "up")

ghaskins
2017-01-18 03:13
and then try again: that should start you fresh

ghaskins
2017-01-18 03:14
note that you are blowing away the old containers though

ghaskins
2017-01-18 03:14
@cbf do we have an archive of any of the old GH issues?

ghaskins
2017-01-18 03:15
I had written an issue (I believe it predated the JIRA migration)

shaggy_kp
2017-01-18 03:26
@ghaskins I tried running "docker-compose down" but this resulted in the same error.

ghaskins
2017-01-18 03:27
are you specifying any volume mounts in your composition?

shaggy_kp
2017-01-18 03:29
I don't think so. Actually, the errors are not exactly the same. Below is what I get now:

shaggy_kp
2017-01-18 03:29
vp0_1 | 03:25:06.119 [crypto] Errorf -> ERRO 021 [validator.my_vp0] Failed requesting read certificate [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp0_1 | 03:25:06.119 [crypto] Errorf -> ERRO 022 [validator.my_vp0] Failed requesting ECA certificate [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp0_1 | 03:25:06.119 [crypto] Errorf -> ERRO 023 [validator.my_vp0] Failed getting ECA certificate [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp0_1 | 03:25:06.119 [crypto] Errorf -> ERRO 024 [validator.my_vp0] Failed retrieving ECA certs chain [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp0_1 | 03:25:06.119 [crypto] Errorf -> ERRO 025 [validator.my_vp0] Failed registering node crypto engine [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp0_1 | 03:25:06.119 [crypto] Errorf -> ERRO 026 [validator.my_vp0] Failed registering peer [my_vp0]: [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure] vp0_1 | 03:25:06.120 [crypto] Errorf -> ERRO 027 [validator.my_vp0] Failed registering [my_vp0]: [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure] vp0_1 | 03:25:06.120 [crypto] RegisterValidator -> ERRO 028 Failed registering validator [my_vp0] with name [my_vp0] [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp0_1 | Error: rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure vp0_1 | 2017/01/18 03:25:06 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 172.17.0.2:7054: getsockopt: connection refused"; Reconnecting to {"membersrvc:7054" <nil>}

ghaskins
2017-01-18 03:30
is this v0.6 or master?

shaggy_kp
2017-01-18 03:32
The hyperledger/fabric-peer is latest

shaggy_kp
2017-01-18 03:32
but the hyperledger I cloned is v0.6

shaggy_kp
2017-01-18 03:59
I was able to at least get my network up and running again by changing the ports listing in my docker-compose.yml. It was listing 7050, 7051, and 7053. I changed it to 7051,7052,7053.

shaggy_kp
2017-01-18 04:00
I don't understand why listing port 7050 doesn't work

arnabkaycee
2017-01-18 04:42
has joined #fabric

yedendra
2017-01-18 05:22
has joined #fabric

ss6
2017-01-18 07:16
has joined #fabric

thojest
2017-01-18 09:15
hey guys i need a bit help with the govendor

thojest
2017-01-18 09:16
in the documentation i have found that one has to vendor the dependencies in order to deploy chaincode using hfc sdk

thojest
2017-01-18 09:16
` go get -u http://github.com/kardianos/govendor cd $GOPATH/src/github.com/chaincode_example02 govendor init govendor fetch http://github.com/hyperledger/fabric`

thojest
2017-01-18 09:16
might someone explain what these lines do?

thojest
2017-01-18 09:17
so the first updates govendor package correct? doesnt matter in which directory i am?!

thojest
2017-01-18 09:17
what exactly does `govendor init` and `govendor fetch`

thojest
2017-01-18 09:18
so if you have no idea the documentation on github is far too less

thojest
2017-01-18 09:42
so i think i have an idea now

thojest
2017-01-18 09:43
so what i have now basically done is `govendor init`

thojest
2017-01-18 09:43
and `govendor add +external`

thojest
2017-01-18 09:46
thus, entering `govendor list` shows that all dependencies are present

vadim
2017-01-18 09:46
aren’t vendor dependencies already present in the repository?


thojest
2017-01-18 09:51
hm what do you mean?

vadim
2017-01-18 09:51
what are you trying to do?

thojest
2017-01-18 09:52
im trying to deploy my chaincode in non-dev mode using the hfc sdk

thojest
2017-01-18 09:53
i was told that i had to vendor dependencies which i think i have done now

vadim
2017-01-18 09:53
you can build chaincode without fetching any vendor dependencies because they are already in the repository

vadim
2017-01-18 09:53
you don’t need govendor, just make sure your fabric is in the gopath

thojest
2017-01-18 09:53
i think that is not true

vadim
2017-01-18 09:53
I just send you the link

thojest
2017-01-18 09:54
when you want to deploy via hfc sdk then you have to include the dependencies on shim package and so on

thojest
2017-01-18 09:54
this is not true for deploying via CLI

thojest
2017-01-18 09:54
in fact i can deploy my chaincode easily using command line

thojest
2017-01-18 09:54
but when deploying via hfc you have to vendor

vadim
2017-01-18 09:54
ok if you say so

thojest
2017-01-18 09:55
anyway i get an error message now :smile:

thojest
2017-01-18 09:59
and i think i somehow run into trouble with the directory structure

garisingh
2017-01-18 10:15

garisingh
2017-01-18 10:15
this is a demo which shows deploying chaincode in net mode using the NodeSDK

garisingh
2017-01-18 10:15
the link I sent shows how to set up your chaincode structure

thojest
2017-01-18 10:19
@garisingh thx thats exactly what im looking at

thojest
2017-01-18 10:19
so i identified the problem i think

thojest
2017-01-18 10:20
the docker container in which the chaincode is deployed

thojest
2017-01-18 10:22
runs the following command during the deploy process

thojest
2017-01-18 10:22
`/bin/sh -c go install build-chaincode && cp src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chaincode $GOPATH/bin/25e6a48b86db7565f6c2d14422144bb4fcaf92ec4c`

thojest
2017-01-18 10:23
the problem i get is `cp: cannot stat 'src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml': No such file or directory`

meraki
2017-01-18 10:23
has joined #fabric

thojest
2017-01-18 10:23
so the problem i think is that `go install build-chaincode`

thojest
2017-01-18 10:23
does not create the `../peer` folder

thojest
2017-01-18 10:24
and this is true as i have logged into the container `docker run -it ....`

thojest
2017-01-18 10:25
and run the commands manually

thojest
2017-01-18 10:25
there is no peer directory

thojest
2017-01-18 10:27
is it possible that this has to do with my hfc sdk version im using? as im using the newest version which is @0.6.5 i think but i use hyperledger fabric v0.6

maritere
2017-01-18 10:30
has joined #fabric

maritere
2017-01-18 10:30
Hello everyone, I have tried to do a production Hyperledger network, however I can not have more than four peers. When I run, for example, five peers, the peers runs. However, when I deploy a chaincode, only four peers has the copy of the chaincode, so I think that the fifth peer does not see the others peer. Could anyone help me? Thx

yacovm
2017-01-18 10:34
you're running v0.6 right? @maritere ?

maritere
2017-01-18 10:36
yeah

thojest
2017-01-18 10:37
i think the problem is with `govendor add +external`

thojest
2017-01-18 10:37
so if i run `govendor list`

thojest
2017-01-18 10:38
should it list the fabric/peer folder ?


yacovm
2017-01-18 10:39
What is the value of N here?

yacovm
2017-01-18 10:39
in your directory, that is

maritere
2017-01-18 10:40
Thanks very much! I'm going to try again changing it!! :grin:

yacovm
2017-01-18 10:40
Thank me only if it works

thojest
2017-01-18 10:47
if im running `govendor fetch http://github.com/hyperledger/fabric` it does exactly nothing

balakrishna
2017-01-18 13:10
Hello guys, can anyone help me how to setup fabric without java images and stuff getting installed ?

umasuthan
2017-01-18 13:33
Do we have an option to configure as to how many transactions constitute 1 block in V 0.6?


thojest
2017-01-18 13:53
trying to deploy my chaincode via hfc sdk i get the following error

thojest
2017-01-18 13:54
transport: http2Server.HandleStreams failed to receive the preface from client: read tcp 127.0.0.1:7051->127.0.0.1:42608: read: connection reset by peer

thojest
2017-01-18 13:54
what does it mean?

umasuthan
2017-01-18 14:01
@garisingh, Thank you so much for the pointer

thojest
2017-01-18 14:03
the first ip address+ port is my peer node

thojest
2017-01-18 14:03
but what is the second?

thojest
2017-01-18 14:24
@jzhang i have read somewhere that you have been involved in fixing this. im trying to deploy my chaincode via hfc sdk i get the following error transport: http2Server.HandleStreams failed to receive the preface from client: read tcp 127.0.0.1:7051->127.0.0.1:42608: read: connection reset by peer im using hyperledger v0.6 and this is independent of the version of hfc im using (happens for all v 0.6.x). do you have an idea what the problem is?

jzhang
2017-01-18 14:33
@thojest the message is a bit different now but I believe it basically says the peer node (:7051) is talking to newly instantiated container instance for executing chaincode (:42608), but the connection has been severed because the container instance was done executing chaincode. this should be harmless (unless this is happening in a different context, which is difficult to tell without further details)

jzhang
2017-01-18 14:34
in the end was your transaction successfully processed?

thojest
2017-01-18 14:37
@jzhang the problem is that the docker container for the chaincode seems missing a desired core.yaml file. this is the complete error log 2017/01/18 15:15:28 transport: http2Server.HandleStreams failed to receive the preface from client: read tcp 127.0.0.1:7051->127.0.0.1:42742: read: connection reset by peer 15:15:37.310 [dockercontroller] deployImage -> ERRO 017 Error building images: The command '/bin/sh -c go install build-chaincode && cp src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chaincode $GOPATH/bin/dda8de96c689d94fa8b7235a272d1e1c8259cc5ad4c2800cefd665113201b515' returned a non-zero code: 1 15:15:37.310 [dockercontroller] deployImage -> ERRO 018 Image Output: ******************** Step 1 : FROM hyperledger/fabric-baseimage ---> 778b7e6e8b67 Step 2 : COPY . $GOPATH/src/build-chaincode/ ---> Using cache ---> 40517f6aa48f Step 3 : WORKDIR $GOPATH ---> Using cache ---> 4e75ace34a7e Step 4 : RUN go install build-chaincode && cp src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chaincode $GOPATH/bin/dda8de96c689d94fa8b7235a272d1e1c8259cc5ad4c2800cefd665113201b515 ---> Running in 18f9a66b9aea cp: cannot stat 'src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml': No such file or directory ******************** 15:15:44.614 [dockercontroller] deployImage -> ERRO 019 Error building images: The command '/bin/sh -c go install build-chaincode && cp src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chaincode $GOPATH/bin/dda8de96c689d94fa8b7235a272d1e1c8259cc5ad4c2800cefd665113201b515' returned a non-zero code: 1 15:15:44.614 [dockercontroller] deployImage -> ERRO 01a Image Output: ******************** Step 1 : FROM hyperledger/fabric-baseimage ---> 778b7e6e8b67 Step 2 : COPY . $GOPATH/src/build-chaincode/ ---> Using cache ---> 40517f6aa48f Step 3 : WORKDIR $GOPATH ---> Using cache ---> 4e75ace34a7e Step 4 : RUN go install build-chaincode && cp src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chaincode $GOPATH/bin/dda8de96c689d94fa8b7235a272d1e1c8259cc5ad4c2800cefd665113201b515 ---> Running in 7b3c35858ed2 cp: cannot stat 'src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml': No such file or directory ******************** 15:15:44.614 [chaincode] Launch -> ERRO 01b launchAndWaitForRegister failed Error starting container: The command '/bin/sh -c go install build-chaincode && cp src/build-chaincode/vendor/github.com/hyperledger/fabric/peer/core.yaml $GOPATH/bin && mv $GOPATH/bin/build-chaincode $GOPATH/bin/dda8de96c689d94fa8b7235a272d1e1c8259cc5ad4c2800cefd665113201b515' returned a non-zero code: 1

jzhang
2017-01-18 14:42
the first thing that comes to mind is how you obtained the “fabric-baseimage” docker image

thojest
2017-01-18 14:43
@jzhang i git clonde v0.6 hyperledger and built it myself

jzhang
2017-01-18 14:43
ok, that should be fine then. the next one is whether you have populated a “vendor” folder in the chaincode directory that contains the fabric source tree

thojest
2017-01-18 14:44
@jzhang note that i can deploy my chaincode without using hfc sdk

thojest
2017-01-18 14:44
@jzhang i also think that i have done something wrong using govendor

jzhang
2017-01-18 14:44
yes and creating the “vendor” folder is specific to deploying from hfc, and a step many developers miss

jzhang
2017-01-18 14:45
check to make sure it’s there alongside your chaincode go file

thojest
2017-01-18 14:45
@jzhang what ive done is `govendor init` and `govendor add +external`

thojest
2017-01-18 14:45
@jzhang then `go build`

jzhang
2017-01-18 14:45
can you `ls` your chaincode folder and the `vendor` folder?

thojest
2017-01-18 14:46
drwxrwxr-x 4 hyper hyper 4096 Jan 18 15:15 ./ drwxrwxr-x 14 hyper hyper 4096 Jan 18 10:08 ../ -rw-rw-r-- 1 hyper hyper 1425 Jan 17 09:30 app2.js -rw-rw-r-- 1 hyper hyper 2629 Jan 18 15:12 app.js -rwxrwxr-x 1 hyper hyper 12537737 Jan 18 13:44 dappsettlement* -rw-rw-r-- 1 hyper hyper 696 Jan 16 14:55 index.htm drwxrwxr-x 175 hyper hyper 4096 Jan 18 14:43 node_modules/ -rw-rw-r-- 1 hyper hyper 492 Jan 18 14:43 package.json -rw-rw-r-- 1 hyper hyper 8960 Jan 18 10:21 settlement.go -rwxrwxrwx 1 hyper hyper 139 Jan 17 17:34 starterwdev.sh* drwxrwxr-x 6 hyper hyper 4096 Jan 18 13:44 vendor/

thojest
2017-01-18 14:46
drwxrwxr-x 4 hyper hyper 4096 Jan 18 15:15 ./ drwxrwxr-x 14 hyper hyper 4096 Jan 18 10:08 ../ -rw-rw-r-- 1 hyper hyper 1425 Jan 17 09:30 app2.js -rw-rw-r-- 1 hyper hyper 2629 Jan 18 15:12 app.js -rwxrwxr-x 1 hyper hyper 12537737 Jan 18 13:44 dappsettlement* -rw-rw-r-- 1 hyper hyper 696 Jan 16 14:55 index.htm drwxrwxr-x 175 hyper hyper 4096 Jan 18 14:43 node_modules/ -rw-rw-r-- 1 hyper hyper 492 Jan 18 14:43 package.json -rw-rw-r-- 1 hyper hyper 8960 Jan 18 10:21 settlement.go -rwxrwxrwx 1 hyper hyper 139 Jan 17 17:34 starterwdev.sh* drwxrwxr-x 6 hyper hyper 4096 Jan 18 13:44 vendor/

thojest
2017-01-18 14:47
second part is vendor folder

jzhang
2017-01-18 14:47
both look the same

thojest
2017-01-18 14:47
yeah ur right :smile: second

thojest
2017-01-18 14:47
drwxrwxr-x 6 hyper hyper 4096 Jan 18 13:44 ./ drwxrwxr-x 4 hyper hyper 4096 Jan 18 15:15 ../ drwxrwxr-x 11 hyper hyper 4096 Jan 18 13:44 http://github.com/ drwxrwxr-x 3 hyper hyper 4096 Jan 18 13:44 http://golang.org/ drwxrwxr-x 3 hyper hyper 4096 Jan 18 13:44 http://google.golang.org/ drwxrwxr-x 3 hyper hyper 4096 Jan 18 13:44 http://gopkg.in/ -rw-rw-r-- 1 hyper hyper 11407 Jan 18 13:44 vendor.json

jzhang
2017-01-18 14:48
can you double check the file `vendor/github.com/hyperledger/fabric/peer/core.yaml is there?

thojest
2017-01-18 14:48
when i do `govendor list`

thojest
2017-01-18 14:48
thats exactly what i suspect

thojest
2017-01-18 14:48
it isnt there

thojest
2017-01-18 14:49
as it is not in `govendor list` depndencies

jzhang
2017-01-18 14:50
@ratnakar may have a suggestion here on how to properly populate the `vendor` folder. i think git clone the fabric repo under the `vendor/github.com/hyperledger` directory should fix it

jzhang
2017-01-18 14:50
although i don’t know if there’s a better way to do this using govendor only

thojest
2017-01-18 14:50
thanks alot now i know what is the problem :slightly_smiling_face:

thojest
2017-01-18 14:51
@jzhang last qustion: using `govendor fetch http://github.com/hyperledger/fabric` does nothing

thojest
2017-01-18 14:51
do you have an idea why

thojest
2017-01-18 14:52
this is the reason i had to `govendor add +external` instead of fetching from net

jzhang
2017-01-18 14:55
not sure, haven’t used govendor that much :wink:

thojest
2017-01-18 14:56
@jzhang no problem. thanks alot u really helped me :slightly_smiling_face:

jzhang
2017-01-18 14:57
yw

kamo
2017-01-18 14:57
Is there anybody who got the asset_management example to work?

ratnakar
2017-01-18 15:08
@jzhang @thojest I never succeeded with `govendor` , hence I always created a folder `mkdir -p vendor/github.com/hyperledger` and clone of V0.6 based fabric code `git clone -b v0.6 --single-branch https://github.com/hyperledger/fabric.git`

thojest
2017-01-18 15:09
@ratnakar does this mean that i basically just have to copy the whole fabric folder into vendor ?

ratnakar
2017-01-18 15:16
yes that is right @thojest

thojest
2017-01-18 15:17
@ratnakar but i do not have to built it again?!

ratnakar
2017-01-18 15:17
No you don't need to build

thojest
2017-01-18 15:18
@ratnakar this is nice.... took me 2 days :smile:

ratnakar
2017-01-18 15:20
Here is a sample program if you want to use non-vagrnt environment (using Fabric V0.6 based images ) https://github.com/ratnakar-asara/hello-blockchain

thojest
2017-01-18 15:22
@ratnakar thx alot im not using vagrant i built fabric v0.6 myself on bare metal ubuntu......... and now its finally working. i have deployed my first chaincode using a nodejs app HEUREKA!

kamo
2017-01-18 16:06
@thojest can you please just describe in short how you built your own peer and membersrvc images? would be very helpful

thojest
2017-01-18 16:17
@kamo well basically you just have to git clone hyperledger/fabric on github (i cloned v0.6) and then you have to change into the fabric directory

thojest
2017-01-18 16:17
there run `sudo make`

thojest
2017-01-18 16:18
however you have to install a lot of things before like go, docker, pip, nodejs, npm, rocksdb, ......................

kamo
2017-01-18 16:19
I installed all of this stuff, but im under OSX :confused:

thojest
2017-01-18 16:19
it took me one or two days to get this working

thojest
2017-01-18 16:19
@kamo i have no experience with osx but i think you then just need the right compiler

kamo
2017-01-18 16:20
okay thanks !

madhava
2017-01-18 16:20
@thojest have initially done the same setup but when i deploy chain code it never created a docker image

thojest
2017-01-18 16:21
@madhava what exactly goes wrong?

madhava
2017-01-18 16:23
have exactly installed fabric as mentioned like above on Ubuntu and was able to deploy and invoke chain code by running below cmds

madhava
2017-01-18 16:23
CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=172.17.0.3:7051 ./chaincode_example02 CORE_PEER_ADDRESS=172.17.0.3:7051 ./peer chaincode deploy -n mycc -c '{"Args": ["init", "a","100", "b", "200"]}' CORE_PEER_ADDRESS=172.17.0.3:7051 ./peer chaincode invoke -l golang -n mycc -c '{"Args": ["invoke", "a", "b", "10"]}'

madhava
2017-01-18 16:24
but was not able to call the chain code through Rest API because above cmds never returned chaincodeID

thojest
2017-01-18 16:26
@madhava well when you deployed that way i think you have deployed in developer mode

thojest
2017-01-18 16:26
so you started your peer with `peer node start --peer-chaincodedev`

thojest
2017-01-18 16:27
this way the chaincode is not run in a docker container

thojest
2017-01-18 16:27
im not sure if you then get a chaincodeId ?

madhava
2017-01-18 16:28
this is the docker compose yaml file which i used to start peer and memberserv

madhava
2017-01-18 16:28

madhava
2017-01-18 16:28
DEPLOY_MODE=dev

thojest
2017-01-18 16:28
i think in line 43

thojest
2017-01-18 16:29
yes!

madhava
2017-01-18 16:29
yes its in development mode only

thojest
2017-01-18 16:29
@madhava have you tried deploying in non-dev mode?

madhava
2017-01-18 16:30
not yet

madhava
2017-01-18 16:32
@thojest you want me to change it to network mode, i am running only on one node

thojest
2017-01-18 16:35
@madhava well i dont know if that helps

madhava
2017-01-18 16:37
ok, @thojest when you deploy are you getting ChaincodeID through this setup

madhava
2017-01-18 16:37
i registered the chain code

madhava
2017-01-18 16:37
ubuntu@ip-20-0-4-206:~/work/src/github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02$ CORE_CHAINCODE_ID_NAME=mycc CORE_PEER_ADDRESS=172.17.0.3:7051 ./chaincode_example02 16:37:11.817 [shim] DEBU : Peer address: 172.17.0.3:7051 16:37:11.821 [shim] DEBU : os.Args returns: [./chaincode_example02] 16:37:11.822 [shim] DEBU : Registering.. sending REGISTER 16:37:11.825 [shim] DEBU : []Received message REGISTERED from shim 16:37:11.825 [shim] DEBU : []Handling ChaincodeMessage of type: REGISTERED(state:created) 16:37:11.825 [shim] DEBU : Received REGISTERED, ready for invocations

thojest
2017-01-18 16:38
wait a second

thojest
2017-01-18 16:39
yes

thojest
2017-01-18 16:39
peer chaincode deploy -p settlement -c '{"Args": ["init"]}' Deploy chaincode: 92f79709651eba638a7ad8f07c75aefa78c256746fcabf6bb814fc502a650178e6957f3cc65f1d92c91e68e74ee50ca8b4cd7a5b3edd65ea94fd4a298a21ed72

thojest
2017-01-18 16:39
is that what you want?

madhava
2017-01-18 16:39
yes

thojest
2017-01-18 16:39
you can now invoke using

thojest
2017-01-18 16:40
`peer chaincode invoke -n THISLARGEHASH -c '{"Args": ......}'`

thojest
2017-01-18 16:41
then start your peer node in non-dev mode and deploy like i have written

madhava
2017-01-18 16:41
yes i did the same

madhava
2017-01-18 16:41
but it will never give the chain code id

madhava
2017-01-18 16:41
CORE_PEER_ADDRESS=172.17.0.3:7051 ./peer chaincode deploy -n mycc -c '{"Args": ["init", "a","100", "b", "200"]}'

thojest
2017-01-18 16:41
you have to deploy with -p

thojest
2017-01-18 16:42
instead of -n

thojest
2017-01-18 16:42
-p and then specifiy the directory of your chaincode RELATIVE to $GOPATH/src

thojest
2017-01-18 16:42
which is settlement in my case

madhava
2017-01-18 16:44
ok let me try

madhava
2017-01-18 16:49
@thojest when i tried with relative path its says path doesn't exist

madhava
2017-01-18 16:49
CORE_PEER_ADDRESS=172.17.0.3:7051 ./peer chaincode deploy -p $GOPATH/src/github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Args": ["init", "a","100", "b", "200"]}' Error: Error building chaincode: rpc error: code = 2 desc = Path to chaincode does not exist: /home/ubuntu/work/src/github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02

madhava
2017-01-18 16:49
but if i do ls

madhava
2017-01-18 16:49
ubuntu@ip-20-0-4-206:~/work/src/github.com/hyperledger/fabric/build/bin$ ls $GOPATH/src/github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 chaincode_example02 chaincode_example02.go chaincode_example02_test.go

madhava
2017-01-18 16:50
i can see files

thojest
2017-01-18 16:50
yeah u misunderstood me i think


madhava
2017-01-18 16:52
does it will take the chain code from gitgub or from my local, just for my clarification

thojest
2017-01-18 16:52
local

madhava
2017-01-18 16:56
ok, it worked :slightly_smiling_face: thank you @thojest , can you also please help with invoke statement, currently am using below statement

madhava
2017-01-18 16:56
CORE_PEER_ADDRESS=172.17.0.3:7051 ./peer chaincode invoke -l golang -n mycc -c '{"Args": ["invoke", "a", "b", "10"]}'

madhava
2017-01-18 16:56
now have chaincodeID will above statement will change?

thojest
2017-01-18 16:56
just exchange mycc with the chaincodeid

madhava
2017-01-18 16:57
ok

thojest
2017-01-18 16:57
and i think you do not have to enter -l golang as this is default

madhava
2017-01-18 17:00
ok invoke worked perfectly but when i run query its giving me some error

madhava
2017-01-18 17:01
CORE_PEER_ADDRESS=172.17.0.3:7051 ./peer chaincode query -n ee5b24a1f17c356dd5f6e37307922e39ddba12e5d2e203ed93401d7d05eb0dd194fb9070549c5dc31eb63f4e654dbd5a1d86cbb30c48e3ab1812590cd0f78539 -c '{"Args": ["query", "b"]}' Error: Error querying chaincode: rpc error: code = 2 desc = Error:Failed to launch chaincode spec(Could not get deployment transaction for ee5b24a1f17c356dd5f6e37307922e39ddba12e5d2e203ed93401d7d05eb0dd194fb9070549c5dc31eb63f4e654dbd5a1d86cbb30c48e3ab1812590cd0f78539 - LedgerError - ResourceNotFound: ledger: resource not found)

thojest
2017-01-18 17:02
hmm maybe try another name for your `query` in Args

thojest
2017-01-18 17:02
this is the function which is mapped to Query using the shim interface

thojest
2017-01-18 17:02
maybe this is a problem but i dont know

madhava
2017-01-18 17:04
ok but actually am using sample chain code 02 which is present in git hub only

thojest
2017-01-18 17:06
hmm then this shouldnt be a problem

thojest
2017-01-18 17:07
let me try it myself

thojest
2017-01-18 17:14
@madhava hmm it works in my case

thojest
2017-01-18 17:14
peer chaincode query -n c9982b613cbb9031dec8657ee3109219a8a8bd2bc96f70c3786de605c92563b8cc9d84e0110fc16e548913bf13397698a8b9171556f20bc605aa8947bd0ddfce -c '{"Args": ["query", "Bob"]}' Query Result: 10

thojest
2017-01-18 17:15
i think you have pasted the wrong chaincode id

thojest
2017-01-18 17:16
note that it changes if slightly change your deployment initialization or the chaincode itsself

thojest
2017-01-18 17:16
i was able to reproduce your error using a wrong chaincodeID

mcoblenz
2017-01-18 17:22
has joined #fabric

jonathanlevi
2017-01-18 17:23
Copying this from #general

jonathanlevi
2017-01-18 17:24
There is also a #fabric-consensus-dev channel, but I think that a very good JIRA item that may give you very specific detail (and other references) is https://jira.hyperledger.org/browse/FAB-37

jonathanlevi
2017-01-18 17:25
Since you want the “cutting edge” / latest. Also, just quickly, the `master` branch of fabric is where the “new” stuff is being developed.

jonathanlevi
2017-01-18 17:26
There are dev-previews (with snapshots, that are considered more stable), but in general, that branch is considered the main, under-development one.

jonathanlevi
2017-01-18 17:29
(invited you there)

mcoblenz
2017-01-18 17:30
Excellent, I’ll read through that. Thanks!

madhava
2017-01-18 17:34
@thojest i actually modified invoke statement for query but still same error :disappointed:

madhava
2017-01-18 17:34
ubuntu@ip-20-0-4-206:~/work/src/github.com/hyperledger/fabric/build/bin$ CORE_PEER_ADDRESS=172.17.0.3:7051 ./peer chaincode invoke -n ee5b24a1f17c356dd5f6e37307922e39ddba12e5d2e203ed93401d7d05eb0dd194fb9070549c5dc31eb63f4e654dbd5a1d86cbb30c48e3ab1812590cd0f78539 -c '{"Args": ["invoke", "a", "b", "10"]}' ubuntu@ip-20-0-4-206:~/work/src/github.com/hyperledger/fabric/build/bin$ CORE_PEER_ADDRESS=172.17.0.3:7051 ./peer chaincode query -n ee5b24a1f17c356dd5f6e37307922e39ddba12e5d2e203ed93401d7d05eb0dd194fb9070549c5dc31eb63f4e654dbd5a1d86cbb30c48e3ab1812590cd0f78539 -c '{"Args": ["query","a"]}' Error: Error querying chaincode: rpc error: code = 2 desc = Error:Failed to launch chaincode spec(Could not get deployment transaction for ee5b24a1f17c356dd5f6e37307922e39ddba12e5d2e203ed93401d7d05eb0dd194fb9070549c5dc31eb63f4e654dbd5a1d86cbb30c48e3ab1812590cd0f78539 - LedgerError - ResourceNotFound: ledger: resource not found)

jonathanlevi
2017-01-18 17:36
@madhava, @thojest: Think you two can you move these discussions to #fabric-dev or to some other/more specific channel?

madhava
2017-01-18 17:36
ok

jonathanlevi
2017-01-18 17:36
p..s Yes, the CC does not seem to have been deployed successfully (hence the R not Found error)

mariap
2017-01-18 17:48
has joined #fabric

choas
2017-01-18 20:18
has joined #fabric

falseprophet
2017-01-18 20:58
has joined #fabric

falseprophet
2017-01-18 20:58
Hello everyone

ingcr3at1on
2017-01-18 21:49
so I gather the membersvc has been moved into cop is there any documentation setup for replacing the membersvc docker image with a cop instance for non-vagrant linux setups? (referring to this setup guide: http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Chaincode-setup/#option-3-docker-toolbox)

ingcr3at1on
2017-01-18 21:50
(possibly a better question for #fabric-cop ?)

garisingh
2017-01-18 21:54
@ingcr3at1on - quick answer is the fabric-cop cannot replace membersvc when using v0.6

ingcr3at1on
2017-01-18 21:56
hmm, fair enough; maybe a better question would be how can I create my own membersvc docker image so that I don't have to edit the membersvc.yaml file inside the docker container after it starts if I want to modify that configuration lol

ingcr3at1on
2017-01-18 21:56
I probably missed something when I was looking through git

ingcr3at1on
2017-01-18 21:57
or would it be more prudent for me to switch to a newer version of fabric and use cop lol

ingcr3at1on
2017-01-18 22:05
hmm, nvm seems I missed some documentation for setting up a network, thanks @garisingh

ghaskins
2017-01-18 22:18
@ingcr3at1on: there are a few options

ingcr3at1on
2017-01-18 22:18
I'm all ears :smile:

ingcr3at1on
2017-01-18 22:18
(assuming you don't mind sharing)

ghaskins
2017-01-18 22:18
You can always override individual parameters with envvars, I assume you already know that

ghaskins
2017-01-18 22:18
(Sorry, mobile and thus slow)

ingcr3at1on
2017-01-18 22:18
no worries

ingcr3at1on
2017-01-18 22:19
I hadn't actually thought to try that yet (now I feel stupid cause we do that with our docker containers at my job)

ghaskins
2017-01-18 22:19
You can also derive a new docker container with "FROM hyperledger..."

ghaskins
2017-01-18 22:19
You can volume mount a new yaml

ghaskins
2017-01-18 22:20
E.g. "docker run -v path/to/replacement/membersvcs.yaml:/etc/hyperledger/fabric ..."

ghaskins
2017-01-18 22:20
Check paths, that is from memory

ghaskins
2017-01-18 22:21
And lastly, you can hack fabric.git and then "make membersvcs-image"

ghaskins
2017-01-18 22:22
That's all I can think of

ghaskins
2017-01-18 22:22
But those are a few options

ingcr3at1on
2017-01-18 22:23
yeah that last option was what I was looking into but I hadn't actually thought of overriding the yaml for some reason lol

ingcr3at1on
2017-01-18 22:23
thanks

kamo
2017-01-18 22:56
@ghaskins regarding the third possibility, is it possible to call “make membersrvc-image” on OS X ?

ghaskins
2017-01-18 23:16
We support building on OS X in master, but membersvc moved to fabric-cop

jorgedr
2017-01-18 23:21
has joined #fabric

kamo
2017-01-18 23:35
yes, but i want to work with v0.6 until master is stable, is there a possibility for building own docker images on OSX?

ghaskins
2017-01-19 02:29
I did quite a bit of work on master to get that all working

ghaskins
2017-01-19 02:29
so, I doubt you could just take the v0.6.1-preview and build it

ghaskins
2017-01-19 02:29
that said, if you are adventurous, I'm sure you could backport the patches

ghaskins
2017-01-19 02:30
ill warn you though: I dont think it will be trivial. I recall there were not only build system changes, but also bug fixes

ghaskins
2017-01-19 02:31
for instance, AUTODETECT ends up being critical on OSX b/c of the way the docker-for-mac treats 0.0.0.0 addressing

ghaskins
2017-01-19 02:33
but you can also always use vagrant

ghaskins
2017-01-19 02:33
that is supported on OSX for v0.6

maritere
2017-01-19 08:20
it didn't work :white_frowning_face: I'm still researching

yuwei
2017-01-19 08:55
can fabric run in a real machine instead of docker container? I mean docker is only used for chaincode.

thojest
2017-01-19 08:55
hi everyone, I have a question concerning the application of blockchain in banks. Lets say you have some asset e.g. a bond and you want model the cashflows of this bond on a blockchain. How would you do that? Can you just use integers written into the blockchain for the cash? Or do you use a token? How do you connect the blockchain to the bank's core system? Are there any materials about this?

yacovm
2017-01-19 09:36
@yuwei yes it can

thojest
2017-01-19 09:41
@yuwei yes im doing this

hanhzf
2017-01-19 09:59
hi, is there a way that we can deploy chaincode from binary instead of chaincode source code ? Using source code, we have to keep a go run time environment :joy:

yuryandreev
2017-01-19 10:01
@yuryandreev uploaded a file: https://hyperledgerproject.slack.com/files/yuryandreev/F3TG59ASX/-.txt and commented: I try to run fabric with peer environment - CORE_PEER_TLS_ENABLED=true, and get error

yuwei
2017-01-19 10:19
@yacovm: thanks

thojest
2017-01-19 10:20
question: when i deploy a chaincode on a peer node this opens a docker container where the chaincode is run

thojest
2017-01-19 10:20
correct?!

thojest
2017-01-19 10:21
is the chaincode written somehow into the blockchain or at least a hash?

thojest
2017-01-19 10:26
so now i have a network of peers

thojest
2017-01-19 10:26
and i deploy the chaincode to one peer

thojest
2017-01-19 10:26
how do the others know of this chaincode? does every peer node spin up a docker container on its own?

thojest
2017-01-19 10:26
or do they get the address of the dockercontainer where the chaincode was deployed?

garisingh
2017-01-19 10:36
@thojest - 1) Yes - chaincode is run in a Docker container and the peer process communicates with the chaincode in the container over GRPC 2) In v0.6, each validating peer will spin up its own instance of the chaincode in a Docker container. In v1, each endorser will spin up its own copy of the chaincode as well 3) The bytes of the chaincode (which are used to create / spin-up the Docker container are distributed to the peers as part of the deploy transaction. In v0.6, recall that all validating peers participate in every transaction - so the transactions are broadcast to all validating peers as part of the consensus / transaction flow. The bytes of the chaincode are included in the payload of the transaction (and yes - they do get persisted to the ledger as well). In v1, transactions are broadcast via the ordering service - so if you are part of any given channel on which a deploy was run, you'll receive the bytes of the chaincode in a transaction (in a block) broadcast by the ordering service

subaru365
2017-01-19 10:47
I have a question. Can chaincode run at a set time? Thanks.

garisingh
2017-01-19 10:53
@subaru365 - nope. you'd have to write a cron process outside of fabric to invoke the chaincode at a specified time

subaru365
2017-01-19 10:54
@garisingh Thank you!

thojest
2017-01-19 11:04
@garisingh thx a lot that really helped me to get a better understanding

jerry10301
2017-01-19 11:21
has joined #fabric

garisingh
2017-01-19 12:46
Please note that the fabric-cop channel has been renamed to #fabric-ca (we renamed the repo as well)

thojest
2017-01-19 13:12
is there any good resource which introduces me to event handling in hfc and nodejs ?

john.d.sheehan
2017-01-19 13:35
has joined #fabric

thojest
2017-01-19 13:45
maybe someone can explain to me regarding the hfc sdk

thojest
2017-01-19 13:45
what registerChainCodeEvent exactly does?

thojest
2017-01-19 13:49
especially this

thojest
2017-01-19 13:49
//Listen to custom events var regid = eh.registerChaincodeEvent(chaincodeID, "evtsender", function(event) { console.log(util.format("Custom event received, payload: %j\n", event.payload.toString())); eh.unregisterChaincodeEvent(regid); });

thojest
2017-01-19 13:59
can I emit now the event regid ?

bjorn
2017-01-19 14:40
has joined #fabric

dknochen
2017-01-19 15:39
has joined #fabric

thojest
2017-01-19 15:47
is there a known problem concerning the query of chaincode in docker container

thojest
2017-01-19 15:47
?

thojest
2017-01-19 15:47
i always get leder: resource not found

thojest
2017-01-19 15:47
although I deployed successfully AND am able to invoke without any problems

thojest
2017-01-19 15:48
im using hfc sdk for query

vadim
2017-01-19 15:49
and if you query over console?

thojest
2017-01-19 15:52
successful

thojest
2017-01-19 15:55
it says `Error: Failed to launch chaincode spec(Could not get deployment transaction for 01ad657e..........)`

thojest
2017-01-19 16:03
got it working now

cbf
2017-01-19 17:35
ICYMI - we renamed the fabric-cop component to fabric-ca by popular demand;-)

cbf
2017-01-19 17:36
any changesets in flight may have merge conflicts

cbf
2017-01-19 17:36
best to cherrypick the changeset and apply to a clone of the new repo

cbf
2017-01-19 17:36
and then push again


cbf
2017-01-19 17:39
actually, per @ry you can simply change your git remote... no need to clone the new repo

ghaskins
2017-01-19 18:01

harrijk
2017-01-19 18:02
Let me look

harrijk
2017-01-19 18:03
`08:07:10 sed: -e expression #1, char 23: unknown option to s` ?

harrijk
2017-01-19 18:03
Let me see if I can run this manually

ghaskins
2017-01-19 18:04
im guessing its going to be one of those 's///' vs 's|||' things

ghaskins
2017-01-19 18:04
but odd that it worked on x86

harrijk
2017-01-19 18:06
@ghaskins I'll get back to you on this.

ghaskins
2017-01-19 18:06
ty

ghaskins
2017-01-19 18:07
note that it also fails on P

ghaskins
2017-01-19 18:07
not sure why

ghaskins
2017-01-19 18:07
IIRC its the same pattern

harrijk
2017-01-19 18:25
@ghaskins i changed "/" to "@" in the sed commands and it appears to work just fine.... e.g., sed -e 's@_DOCKER_BASE_@$(DOCKER_BASE)@g' \

harrijk
2017-01-19 18:25
However, I then got this error later on in the build... maybe I don't have the right repo and patch (I did apply 4107 patch on top of fabric-baseimage repo)...

harrijk
2017-01-19 18:26

ghaskins
2017-01-19 18:27
no, its probably me

ghaskins
2017-01-19 18:28
i refactored how the images were built, so im guessing wget made its way into the x86/ubuntu path but not s390/debian

ghaskins
2017-01-19 18:28
ty for investigating

ghaskins
2017-01-19 18:28
ill refactor the sed expressions and try again

ghaskins
2017-01-19 18:29
I think I prefer 's|||' over 's@@@'

ghaskins
2017-01-19 18:29
you ok with that?

harrijk
2017-01-19 18:29
Looks like we need wget for the Debian s390x image

harrijk
2017-01-19 18:29
Yeah, whatever works.

ghaskins
2017-01-19 18:29
ok, figured, but never hurts to make sure

nandini.parimi
2017-01-19 18:32
Is fabric documentation broken? I see that the documentation refers to images but images are not shown : http://hyperledger-fabric.readthedocs.io/en/v0.6/nodeSDK/app-overview/#webApp

yuwei
2017-01-19 20:51
@thojest: thanks

spiro
2017-01-19 21:31
has joined #fabric

sbrakev
2017-01-19 21:36
@garisingh is there an easy way to export the world state in 0.6x nodes?

garisingh
2017-01-19 21:37
depends on your definition of "easy" :wink:

garisingh
2017-01-19 21:37
we don't provide any capability to do it

garisingh
2017-01-19 21:38
of course it's all in rocksdb and so you could kill the peer process and write your own application which dumps the data from rocksdb

nandini.parimi
2017-01-19 21:57
I am having a lot of trouble get fabric up and running on my system. The tutorials and docs seem to be pretty raw. Can someone please point me in the right direction

sbrakev
2017-01-19 22:02
Thanks Gari, that’s about what I was expecting. :slightly_smiling_face:

garisingh
2017-01-19 22:03
@sbrakev I wouldn't waste any time on it unless you have some specific plan in behind to try to move that data to v1.0

nandini.parimi
2017-01-19 22:05
@garisingh was that message directed to my question?

yedendra
2017-01-19 22:41
@nandini.parimi this sample app is a good start : https://github.com/ratnakar-asara/hello-blockchain

nandini.parimi
2017-01-19 22:42
@yedendra thanks a bunch

bharat
2017-01-20 00:51
has joined #fabric

ashishkel
2017-01-20 06:54
Hi, question related to Chaincode. We know that the Chaincode gets deployed in the docker images (with acting as sandbox). Say my dockers went down, say crashed. So how about resuming my Chaincodes? I can see that the docker images are still there, containers are in stopped status. When I issue docker-compose start or restart, that would bring up the other nodes. But how about the Chaincode containers?? How about the ledger which was there? Will that be intact?

dangma
2017-01-20 07:50
has joined #fabric

garisingh
2017-01-20 08:34
@ashishkel - the peer will bring back up the chaincode when needed (i.e. the next time chaincode is invoked / queried). Now you of course should not rely on any non-ledger state being preserved (meaning don't have chaincode which keeps state in memory or attempts to write to the filesystem). What technically happens is that when the peer detects that chaincode is not running, it will first delete any existing container instance for that chaincode and then create a new container instance from the image (if it can't find an existing image it can then get the chaincode bytes from the ledger and build both the image and create/start a container instance) Ledger data / state snapshot are both still intact

hgabor
2017-01-20 10:51
is there any way to pass a map to viper from an env var?

hgabor
2017-01-20 10:52
in the config file there should be a section like: items: // this is a fixed key custom_key1: custom_value1 ...


cbf
2017-01-20 11:36
@eugenluft the latest set of published images is v0.6, yes. We haven't released v1.0 just yet. Possibly in the next couple of weeks we should have v1.0-alpha images published.

eugenluft
2017-01-20 11:36
has joined #fabric


cbf
2017-01-20 11:41
@nikeshgogia which version of Fabric are you using?

nikeshgogia
2017-01-20 11:41
has joined #fabric

cbf
2017-01-20 11:41
and how did you set it up?

nikeshgogia
2017-01-20 11:43
I have made my vp3 as root node and rest as peer connecting to it. When I start VP3 it starts successfully but then I start vp4 I see fllowing on console of vp3 ? Can anybody help or advise whats wrong ? vp3_1 | 58:35.572 [peer] beforeHello -> DEBU 099 Received DISC_HELLO from endpoint=peerEndpoint:<ID:<name:"vp4" > address:"172.17.0.3:7051" type:VALIDATOR pkiID:"\350\272FX\235\327\226\257\275Ma&\221\272\250\335\220\021&\033\372\352\206\0355\r\025\301\236\326I\034" > blockchainInfo:<height:1 currentBlockHash:"F\271\335+\013\250\215\023#;?\353t>\353$?\315R\352b\270\033\202\265\014'dn\325v/\327]\304\335\330\300\362\000\313\005\001\235g\265\222\366\374\202\034IG\232\264\206@).\254\263\267\304\276" > vp3_1 | 05:58:35.573 [crypto] Debugf -> DEBU 09a [validator.vp] Getting enrollment certificate for [6LpGWJ3Xlq+9TWEmkbqo3ZARJhv66oYdNQ0VwZ7WSRw=] vp3_1 | 05:58:35.573 [crypto] Debugf -> DEBU 09b [validator.vp] Retrieve Enrollment certificate for [6LpGWJ3Xlq+9TWEmkbqo3ZARJhv66oYdNQ0VwZ7WSRw=]... vp3_1 | 05:58:35.573 [crypto] Debugf -> DEBU 09c [validator.vp] Select Sign Enrollment Cert for id [6LpGWJ3Xlq+9TWEmkbqo3ZARJhv66oYdNQ0VwZ7WSRw=] vp3_1 | 05:58:35.573 [crypto] Debugf -> DEBU 09d [validator.vp] Cert for [6LpGWJ3Xlq+9TWEmkbqo3ZARJhv66oYdNQ0VwZ7WSRw=] not available. Fetching from ECA.... vp3_1 | 05:58:35.573 [crypto] Debug -> DEBU 09e [validator.vp] Fectch Enrollment Certificate from ECA... vp3_1 | 05:58:35.574 [crypto] Debugf -> DEBU 09f [validator.vp] Reading certificate for hash [e8 ba 46 58 9d d7 96 af bd 4d 61 26 91 ba a8 dd 90 11 26 1b fa ea 86 1d 35 0d 15 c1 9e d6 49 1c] vp3_1 | 05:58:35.574 [crypto] Debug -> DEBU 0a0 [validator.vp] Getting ECA client... vp3_1 | 05:58:35.574 [crypto] Debugf -> DEBU 0a1 [validator.vp] Dial to addr:[membersrvc:7054], with serverName:[tlsca]... vp3_1 | 05:58:35.574 [crypto] Debug -> DEBU 0a2 [validator.vp] TLS disabled... vp3_1 | 05:58:35.574 [crypto] Debug -> DEBU 0a3 [validator.vp] Getting ECA client...done vp3_1 | 58:35.576 [crypto] Errorf -> ERRO 0a4 [validator.vp] Failed requesting read certificate [rpc error: code = 2 desc = sql: no rows in result set]. vp3_1 | 05:58:35.576 [crypto] Errorf -> ERRO 0a5 [validator.vp] Failed requesting enrollment certificate [rpc error: code = 2 desc = sql: no rows in result set]. vp3_1 | 05:58:35.577 [crypto] Errorf -> ERRO 0a6 [validator.vp] Failed getting enrollment certificate for [6LpGWJ3Xlq+9TWEmkbqo3ZARJhv66oYdNQ0VwZ7WSRw=]: [rpc error: code = 2 desc = sql: no rows in result set] vp3_1 | 58:35.577 [crypto] Errorf -> ERRO 0a7 [validator.vp] Failed getting enrollment cert for [e8 ba 46 58 9d d7 96 af bd 4d 61 26 91 ba a8 dd 90 11 26 1b fa ea 86 1d 35 0d 15 c1 9e d6 49 1c]: [rpc error: code = 2 desc = sql: no rows in result set] vp3_1 | 05:58:35.577 [peer] handleChat -> ERRO 0a8 Error handling message: Peer FSM failed while handling message (DISC_HELLO): current state: created, error: transition canceled with error: Error Verifying signature for received HelloMessage: rpc error: code = 2 desc = sql: no rows in result set

nikeshgogia
2017-01-20 11:43
ok

nikeshgogia
2017-01-20 11:43
One one vm I just pulled hyperledger/fabric-baseimage

nikeshgogia
2017-01-20 11:44
and memberservice

garisingh
2017-01-20 11:46
do you have security enabled on vp4?

nikeshgogia
2017-01-20 11:47
yes

nikeshgogia
2017-01-20 11:47
Attaching dockercompose

nikeshgogia
2017-01-20 11:47
vp3

nikeshgogia
2017-01-20 11:47
membersrvc:   # try 'docker ps' to see the container status after starting this compose   container_name: membersrvc   image: hyperledger/fabric-membersrvc   command: membersrvc   volumes: # docker.sock is mapped as the default CORE_VM_ENDPOINT     - /var/run/docker.sock:/var/run/docker.sock   ports:     - "7054:7054"   environment:     - MEMBERSRVC_CA_LOGGING_SERVER=INFO     - MEMBERSRVC_CA_LOGGING_CA=INFO     - MEMBERSRVC_CA_LOGGING_ECA=INFO     - MEMBERSRVC_CA_LOGGING_ECAP=INFO     - MEMBERSRVC_CA_LOGGING_ECAA=INFO     - MEMBERSRVC_CA_LOGGING_ACA=INFO     - MEMBERSRVC_CA_LOGGING_ACAP=INFO     - MEMBERSRVC_CA_LOGGING_TCA=INFO     - MEMBERSRVC_CA_LOGGING_TCAP=INFO     - MEMBERSRVC_CA_LOGGING_TCAA=INFO     - MEMBERSRVC_CA_LOGGING_TLSCA=INFO vp3:   image: hyperledger/fabric-baseimage   environment:     - CORE_PEER_ID=vp3     - CORE_PEER_DISCOVERY_PERIOD=60s      - CORE_PEER_DISCOVERY_TOUCHPERIOD=61s     - CORE_PEER_ADDRESSAUTODETECT=true     - CORE_VM_ENDPOINT=unix:///var/run/docker.sock     - CORE_LOGGING_LEVEL=DEBUG     - CORE_SECURITY_ENABLED=true     - CORE_PEER_PKI_ECA_PADDR=membersrvc:7054     - CORE_PEER_PKI_TCA_PADDR=membersrvc:7054     - CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054     - CORE_SECURITY_ENROLLID=test_vp0     - CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT     - CORE_PEER_VALIDATOR_CONSENSUS_PLUGIN=pbft     - CORE_PBFT_GENERAL_N=4   volumes:     - /var/run/docker.sock:/var/run/docker.sock   ports:     - "7050:7050"     - "7051:7051"     - "7052:7052"     - "7053:7053"   #command: peer node start

nikeshgogia
2017-01-20 11:48
vp4

nikeshgogia
2017-01-20 11:48
membersrvc:   # try 'docker ps' to see the container status after starting this compose   container_name: membersrvc   image: hyperledger/fabric-membersrvc   command: membersrvc   ports:     - "7054:7054"   environment:     - MEMBERSRVC_CA_LOGGING_SERVER=INFO     - MEMBERSRVC_CA_LOGGING_CA=INFO     - MEMBERSRVC_CA_LOGGING_ECA=INFO     - MEMBERSRVC_CA_LOGGING_ECAP=INFO     - MEMBERSRVC_CA_LOGGING_ECAA=INFO     - MEMBERSRVC_CA_LOGGING_ACA=INFO     - MEMBERSRVC_CA_LOGGING_ACAP=INFO     - MEMBERSRVC_CA_LOGGING_TCA=INFO     - MEMBERSRVC_CA_LOGGING_TCAP=INFO     - MEMBERSRVC_CA_LOGGING_TCAA=INFO     - MEMBERSRVC_CA_LOGGING_TLSCA=INFO vp1:   image: hyperledger/fabric-baseimage   environment:     - CORE_PEER_ID=vp1     - CORE_PEER_DISCOVERY_PERIOD=60s     - CORE_PEER_DISCOVERY_TOUCHPERIOD=61s     - CORE_PEER_ADDRESSAUTODETECT=true     - CORE_VM_ENDPOINT=unix:///var/run/docker.sock     - CORE_LOGGING_LEVEL=DEBUG     - CORE_PEER_DISCOVERY_ROOTNODE=publicipvp3:7051     - CORE_SECURITY_ENABLED=true     - CORE_PEER_PKI_ECA_PADDR=membersrvc:7054     - CORE_PEER_PKI_TCA_PADDR=membersrvc:7054     - CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054     - CORE_SECURITY_ENROLLID=test_vp1     - CORE_SECURITY_ENROLLSECRET=5wgHK9qqYaPy     - CORE_PEER_VALIDATOR_CONSENSUS_PLUGIN=pbft     #- CORE_PBFT_GENERAL_MODE=classic     - CORE_PBFT_GENERAL_N=4     #- CORE_PBFT_GENERAL_TIMEOUT_REQUEST=10s     #- CORE_PEER_VALIDATOR_CONSENSUS_PLUGIN=pbft  # noops, pbft     - CORE_PBFT_GENERAL_MODE=batch  # batch. classic and sieve will be not supported again.     #- CORE_PBFT_GENERAL_N=4     #- CORE_PBFT_GENERAL_BATCHSIZE=2  # only useful when in batch mode     #- CORE_PBFT_GENERAL_TIMEOUT_REQUEST=2s   volumes:     - /var/run/docker.sock:/var/run/docker.sock   ports:     - "7050:7050"     - "7051:7051"     - "7052:7052"     - "7053:7053"   #command: peer node start   command: sh -c "sleep 10; peer node start"   tty: true   links:     - membersrvc

nikeshgogia
2017-01-20 11:49
ignore vp1 thats by mistake but these are the actual one

nikeshgogia
2017-01-20 11:52
My vp3 and vp4 has same memberservice and hyperledger/fabric-baseimage

nikeshgogia
2017-01-20 11:52
setup

cbf
2017-01-20 11:53
fabric-baseimage is just used for building chaincode images

cbf
2017-01-20 11:54
if you are running a peer node, you need hyperledger/fabric-peer image

nikeshgogia
2017-01-20 11:54
OK I have renamed fabric-peer to fabric-baseimage

cbf
2017-01-20 11:54
?

nikeshgogia
2017-01-20 11:54
sorry for confusion

cbf
2017-01-20 11:54
you mean in the compose file?

nikeshgogia
2017-01-20 11:55
What i did was I first pulled fabric-peer and ran docker-compose and errored since it was not able to find fabric-baseimage so I tagged peer to fabric-baseimage

nikeshgogia
2017-01-20 11:55
so to answer you specifically I am running fabric-peer only

cbf
2017-01-20 11:56
here's an example of a compose that will start 4 peers and a membersrvc


cbf
2017-01-20 11:56
ah

garisingh
2017-01-20 11:56
@nikeshgogia - I have a feeling that your containers might have gotten out of sync

garisingh
2017-01-20 11:56
you might want to actually delete the exiting containers and run your compose script again

nikeshgogia
2017-01-20 11:57
let me try

garisingh
2017-01-20 11:57
I suspect that at one point vp4 registered with a different instance of membersrv

nikeshgogia
2017-01-20 11:57
I will update you

cbf
2017-01-20 11:57
no, what you want to do is pull hyperledger/fabric-baseimage:x86_64-0.2.0 and tag it as hyperledger/fabric-baseimage:latest then run the compose (the one I linked will work)

nikeshgogia
2017-01-20 11:58
OK

alanlee
2017-01-20 12:05
Peer Topology Question: It seems the topology of connecting peers is a "Star" instead of "Mesh". Is it correct? If we have more than 50 peer nodes, should it be a mesh or a star? Thank you.

alanlee
2017-01-20 12:05
(thinking of resilience)

nikeshgogia
2017-01-20 12:10
Nope Same Error @cbf

nikeshgogia
2017-01-20 12:10
vp0_1 | 12:09:41.748 [peer] beforeHello -> DEBU 0ba Received DISC_HELLO from endpoint=peerEndpoint:<ID:<name:"vp1" > address:"172.18.0.2:7051" type:VALIDATOR pkiID:"\252yn\270_e\276\333\006d\030\221z\222\243a~\317\232\225]\352\004+\177&</\347\207\356z" > blockchainInfo:<height:1 currentBlockHash:"F\271\335+\013\250\215\023#;?\353t>\353$?\315R\352b\270\033\202\265\014'dn\325v/\327]\304\335\330\300\362\000\313\005\001\235g\265\222\366\374\202\034IG\232\264\206@).\254\263\267\304\276" > vp0_1 | 12:09:41.748 [crypto] Debugf -> DEBU 0bb [validator.test_vp0] Getting enrollment certificate for [qnluuF9lvtsGZBiRepKjYX7PmpVd6gQrfyY8L+eH7no=] vp0_1 | 12:09:41.748 [crypto] Debugf -> DEBU 0bc [validator.test_vp0] Retrieve Enrollment certificate for [qnluuF9lvtsGZBiRepKjYX7PmpVd6gQrfyY8L+eH7no=]... vp0_1 | 12:09:41.748 [crypto] Debugf -> DEBU 0bd [validator.test_vp0] Select Sign Enrollment Cert for id [qnluuF9lvtsGZBiRepKjYX7PmpVd6gQrfyY8L+eH7no=] vp0_1 | 12:09:41.748 [crypto] Debugf -> DEBU 0be [validator.test_vp0] Cert for [qnluuF9lvtsGZBiRepKjYX7PmpVd6gQrfyY8L+eH7no=] not available. Fetching from ECA.... vp0_1 | 12:09:41.748 [crypto] Debug -> DEBU 0bf [validator.test_vp0] Fectch Enrollment Certificate from ECA... vp0_1 | 12:09:41.749 [crypto] Debugf -> DEBU 0c0 [validator.test_vp0] Reading certificate for hash [aa 79 6e b8 5f 65 be db 06 64 18 91 7a 92 a3 61 7e cf 9a 95 5d ea 04 2b 7f 26 3c 2f e7 87 ee 7a] vp0_1 | 12:09:41.749 [crypto] Debug -> DEBU 0c1 [validator.test_vp0] Getting ECA client... vp0_1 | 12:09:41.749 [crypto] Debugf -> DEBU 0c2 [validator.test_vp0] Dial to addr:[membersrvc:7054], with serverName:[tlsca]... vp0_1 | 12:09:41.749 [crypto] Debug -> DEBU 0c3 [validator.test_vp0] TLS disabled... vp0_1 | 12:09:41.749 [crypto] Debug -> DEBU 0c4 [validator.test_vp0] Getting ECA client...done vp0_1 | 12:09:41.753 [crypto] Errorf -> ERRO 0c5 [validator.test_vp0] Failed requesting read certificate [rpc error: code = 2 desc = sql: no rows in result set]. vp0_1 | 12:09:41.753 [crypto] Errorf -> ERRO 0c6 [validator.test_vp0] Failed requesting enrollment certificate [rpc error: code = 2 desc = sql: no rows in result set]. vp0_1 | 12:09:41.753 [crypto] Errorf -> ERRO 0c7 [validator.test_vp0] Failed getting enrollment certificate for [qnluuF9lvtsGZBiRepKjYX7PmpVd6gQrfyY8L+eH7no=]: [rpc error: code = 2 desc = sql: no rows in result set] vp0_1 | 12:09:41.753 [crypto] Errorf -> ERRO 0c8 [validator.test_vp0] Failed getting enrollment cert for [aa 79 6e b8 5f 65 be db 06 64 18 91 7a 92 a3 61 7e cf 9a 95 5d ea 04 2b 7f 26 3c 2f e7 87 ee 7a]: [rpc error: code = 2 desc = sql: no rows in result set] vp0_1 | 12:09:41.753 [peer] handleChat -> ERRO 0c9 Error handling message: Peer FSM failed while handling message (DISC_HELLO): current state: created, error: transition canceled with error: Error Verifying signature for received HelloMessage: rpc error: code = 2 desc = sql: no rows in result set

nikeshgogia
2017-01-20 12:11
OK Before that I would love to give one more info

nikeshgogia
2017-01-20 12:11
My 2 Vm is Bluebox, 1 VM in AWS, 1 VM in Alibaba Cloud

eugenluft
2017-01-20 12:30
I´m a little bit confused about the used version and endorsing feature. I have fetched the latest fabric code and every time i´m trying to deploy the code i see an error message `Error: Error endorsing chaincode: rpc error: code = 12 desc = unknown service protos.Endorser`. Endorser is a 1.0 feature and the latest tagged version is 0.6, right?

garisingh
2017-01-20 12:31
@eugenluft - what exactly are you doing? how are you trying to deploy the chaincode?

eugenluft
2017-01-20 12:33
I´m trying to deploy my chaincode with the cli on my running node (docker) with `./peer chaincode deploy -n test -p http://github.com/hyperledger/fabric/pp/chaincode/cc -c '{}'`

eugenluft
2017-01-20 12:34
the node is running in non-dev mode (only `peer node start`)

eugenluft
2017-01-20 12:49
I´m not sure but could it be that i need to pass some parameters, eg. the IP address of the node?

eugenluft
2017-01-20 12:50
Because i can not see any error message on the node itself.

garisingh
2017-01-20 12:53
sorry @eugenluft - got distracted - try `CORE_PEER_ADDRESS=ip:port /peer chaincode deploy -n test -p http://github.com/hyperledger/fabric/pp/chaincode/cc -c '{}'`

thojest
2017-01-20 12:55
it is so much joy when you for the first time query your chaincode via a http request and get back the correct value :slightly_smiling_face:

yedendra
2017-01-20 12:55
I am running a chaincode using node sdk on the 4 node setup in bluemix for the last 3 days. My chaincode is stable and ran without issues on docker. I noticed a couple of issue while running on bluemix. 1. I had to redeploy the same code 10 out of 25 times before proceeding with invoke and query (about 40%). The chaincodeID remained same. I had to force deploycode. 2. After few minutes of idle time, the connection is reset by peer and it crashes the nodejs app. Not sure where to catch this error to avoid my nodejs app crash. ``` events.js:160 throw er; // Unhandled 'error' event ^ Error: {"created":"@1484874109.778586000","description":"Secure read failed","file":"../src/core/lib/security/transport/secure_endpoint.c","file_line":157,"g rpc_status":14,"referenced_errors":[{"created":"@1484874109.778562000","description":"OS Error","errno":54,"file":"../src/core/lib/iomgr/tcp_posix.c","file_l ine":229,"os_error":"Connection reset by peer","syscall":"recvmsg"}]} at ClientDuplexStream._emitStatusIfDone (/Users/yshrini/Developer/BlockChain/work/src/github.ibm.com/IBM-Blockchain/ProvAAS/ProvServer/node_modules/grpc/ src/node/src/client.js:189:19) at ClientDuplexStream._receiveStatus (/Users/yshrini/Developer/BlockChain/work/src/github.ibm.com/IBM-Blockchain/ProvAAS/ProvServer/node_modules/grpc/src /node/src/client.js:169:8) at /Users/yshrini/Developer/BlockChain/work/src/github.ibm.com/IBM-Blockchain/ProvAAS/ProvServer/node_modules/grpc/src/node/src/client.js:634:14 ```

eugenluft
2017-01-20 12:58
@garisingh same issue. The peer is available with localhost:7050/chain and i can see the genesis block, but it fails when i try to use peer CLI … to deploy my chaincode :disappointed:

eugenluft
2017-01-20 13:00
Just to be sure: the right port is 7051?

denisglotov
2017-01-20 14:43
has joined #fabric

denisglotov
2017-01-20 14:43
Hi guys! What is the latest stable version of Fabric? GitHub sources are `0.7.0` while Docker hub hyperledger/fabric-peer is `0.6.1-preview`?

garisingh
2017-01-20 15:43
0.6.1-preview although we should have be getting a build of the v1.0 architecture out hopefully by the end of the month. But if you just want to start getting used to the chaincode model, 0-6-1-preview should be a good fit for you for now

nikeshgogia
2017-01-20 15:52
Hi I have setup 4 peers on different vm all on different cloud [9:09] I am trying to deploy chaincode and i get OK via REST [9:09] I can see connections getting between VM and see all VM in action when I deploy chaincode [9:09] but then when I query data , i dont see data gettung fetched [9:09] it says ledger not found [9:10] I have used PBFT [9:10] can any one suggest where am I wrong [9:10] chaincode is example 02

davidpeyronnin
2017-01-20 15:54
has joined #fabric

ghaskins
2017-01-20 20:36
man, I just cannot win with 1.0

ghaskins
2017-01-20 20:36
@ghaskins uploaded a file: https://hyperledgerproject.slack.com/files/ghaskins/F3TQED4MP/-.m and commented: Playing an annoying game of whack a mole

ghaskins
2017-01-20 20:36
anyone know what this is?

ghaskins
2017-01-20 20:37
i suspect I need to update my SDK, but every time I update a dep, something else breaks, heh

garisingh
2017-01-20 22:01
@ghaskins - there were 2 CRs merged to deal with malleability of EC signatures - one was for fabric and one was for the NodeSDK

ghaskins
2017-01-20 22:01
@garisingh yeah, i think I am good now

ghaskins
2017-01-20 22:01
I upgraded SDK, had to deal with the fallout from the kvstore change, and now I am cooking with gas

ghaskins
2017-01-20 22:01
but ty

bmatsuo
2017-01-21 09:50
has joined #fabric

ghaskins
2017-01-21 12:42
@muralisr @cbf trying to wrap my head around the changes regarding the old Query() interface in master

ghaskins
2017-01-21 12:43
are queries basically gone now?

ghaskins
2017-01-21 12:43
or is there still a notion of a certain mode in which invokes are RO?

silliman
2017-01-21 14:05
@ghaskins in v1.0 explicit queries are no longer necessary. For a query you would send a TransactionProposal, and within the TransactionProposalResponse you will get your ReadSet. If you're satisfied with the results, you're done....since you don't want to update anything, you just call it a day and you don't need to send an endorsement to the Orderer. I suppose for purposes of a Query you could even invoke a function that might even perform updates, since, if you don't send along the Endorsement to the orderer, those changes won't ever be committed.

ghaskins
2017-01-21 14:06
@silliman ty, this makes sense

arnaud
2017-01-21 14:12
@silliman although I understand the logic the resulting API isn't as intuitive

garisingh
2017-01-21 14:12
@ghaskins - it also allows you to do some strong reads as well. but I am pretty sure that we also want to add pass-thru queries on the peer itself as well

arnaud
2017-01-21 14:12
we're going to have to keep explaining that to query you make a proposal you never commit

ghaskins
2017-01-21 14:13
that all makes sense, I was mostly trying to plan how I would update the chaintool schema/code-generator

ghaskins
2017-01-21 14:14
in v0.6 and earlier, transactions/queries were first class in the grammar

garisingh
2017-01-21 14:14
I'd wait a bit on that but I hear ya :wink:

ghaskins
2017-01-21 14:14
wait a bit on what?

arnaud
2017-01-21 14:14
I wonder whether you shouldn't have query as a synonym, just to make the interface more user friendly

garisingh
2017-01-21 14:14
until everything is finalized from an endorser API / chaincode perspective

garisingh
2017-01-21 14:15
although I think the chaincode should stay mostly the same t this point

silliman
2017-01-21 14:15
@arnaud well, when you do an Invoke you have to submit a function name as well so you can just code function names that make it evident it's a query ... just think of invoke as invoking a transaction, some will be read-only, some will perform updates.... just my 2 cents

ghaskins
2017-01-21 14:15
@arnaud I am unclear if you are advocating to keep or remove the query notion in the chaintool grammar?

arnaud
2017-01-21 14:16
I'm advocating to add it back :slightly_smiling_face:

ghaskins
2017-01-21 14:16
heh...im not sure it works well with the current fabric though

ghaskins
2017-01-21 14:16

ghaskins
2017-01-21 14:17
in the code I am working on now, I am collapsing transactions/queries into one "functions" block

arnaud
2017-01-21 14:18
I see

ghaskins
2017-01-21 14:19
@ghaskins uploaded a file: https://hyperledgerproject.slack.com/files/ghaskins/F3UJ58AE7/-.txt and commented: It would look like this now

ghaskins
2017-01-21 14:19
from a function-dispatch perspective, it probably doesnt make sense to delineate them in the grammar any more

arnaud
2017-01-21 14:23
I agree that at this level this actually simplifies the interface

muralisr
2017-01-21 15:44
To add to the discussion (and to @silliman note) … (1) note that we could potentially send a proposal to multiple peers AND have endorserments from them to make sure they all say the same thing. (2) the “query” CLI was just a convenience method as a synonym for “the invoke that won’t be sent as transaction” … ie, the peer itself doesn’t care what the SDK / CLI / User does with it

yacovm
2017-01-21 15:55
sending a proposal to multiple peers sounds good but how do you know about them?

silliman
2017-01-21 16:14
@yacovm as of two days ago in discussions in #fabric-dev @muralisr stated that the CLI does not support a single request being sent to multiple endorsers, so at this time you'd have to send multiple requests to each endorser that interests you. @harrisob then said that the node SDK does support multiple endorsers so perhaps he would be willing to share more details. As to how the client or SDK would know about them, I assume this would be a configuration exercise.

muralisr
2017-01-21 16:21
right, `sending a proposal to multiple peers sounds good but how do you know about them?` we have to enhace the CLI to take a list of peers… I believe there’s already support in node SDK for this but do double-check @yacovm

muralisr
2017-01-21 16:23
(for some reason I keep hitting enter before a name is completed today… wonder if theres some subtle change in slack interface my muscle memory is tripping upon)

yacovm
2017-01-21 16:25
But does this approach scale? The user needs to remember which peers are in which channel

muralisr
2017-01-21 16:33
well, its probably a combination of user/application … the “carasset” application knows to send a “new car “ proposal to DMV and Insurance peers

muralisr
2017-01-21 16:34
but yes, in other applications “who are the peers to send to ?” may not be easy/obvious

bcq
2017-01-21 19:48
has joined #fabric

bcq
2017-01-21 20:50
from http://hyperledger-fabric.readthedocs.io/en/v0.6/starter/fabric-starter-kit/#further-exploration > The setup uses Docker to provide a controlled environment with all the necessary Hyperledger fabric components to support a Node.js application built with the fabric’s Node.js SDK, and chaincode written in Go. 1. what is the difference between the application and the chain code? 2. is it possible to get the same functionality of both the node.js app and the go chaincode using the REST API for the fabric network?

silliman
2017-01-21 21:36
@bcq for #1, in this case, the application is your front-end logic, typically, but not necessarily, including a GUI, that will call the APIs provided by the Node.js SDK. In turn, the implementation of the SDK APIs will deploy or invoke chaincode, also known as smart contracts, which is where CRUD (Create/Read/Update/Delete) operations on the state takes place, and the 'CUD' part of CRUD, in the "happy path", causes immutable transactions to be saved on the blockchain. for #2, in Fabric v0.6, for the most part, the REST API can mimic the SDK calls, but not exactly, e.g. registering and enrolling users behaves differently when done through the SDK than when done through the REST API. Furthermore, the REST API is deprecated for Fabric v1.0. In v1.0 the best practice programming model is to use one of the SDKs. In either case, whether you use SDK calls or REST API calls that deal with chaincode, you are deploying or invoking the chaincode from them, you are not replacing chaincode with them.

bcq
2017-01-21 22:15
@silliman thanks for the explanation. that's very helpful

alacambra
2017-01-22 07:53
has joined #fabric

hashed_corey
2017-01-22 20:08
has joined #fabric

shaggy_kp
2017-01-23 04:03
I am again having the same issue when trying to start my fabric network. I would really appreciate some help. I'm also fairly new to docker containers so that may be part of my issue. The membersrvc processes starts up find but my peer node fails to start each time with the below output. I've also tried to increase the delay before launching my peer node unto 40 seconds to no avail.

shaggy_kp
2017-01-23 04:03
vp0_1 | 03:59:37.092 [crypto] Debugf -> DEBU 028 [validator.mytest_vp0] Storing TCA certificate for [mytest_vp0]... vp0_1 | 03:59:37.093 [crypto] Debug -> DEBU 029 [validator.mytest_vp0] Getting ECA client... vp0_1 | 03:59:37.093 [crypto] Debugf -> DEBU 02a [validator.mytest_vp0] Dial to addr:[membersrvc:7054], with serverName:[tlsca]... vp0_1 | 03:59:37.094 [crypto] Debug -> DEBU 02b [validator.mytest_vp0] TLS disabled... vp0_1 | 03:59:37.094 [crypto] Debug -> DEBU 02c [validator.mytest_vp0] Getting ECA client...done vp0_1 | 03:59:37.120 [crypto] Errorf -> ERRO 02d [validator.mytest_vp0] Failed invoking CreateCertficatePair [rpc error: code = 2 desc = Identity lookup error: sql: no rows in result set]. vp0_1 | 03:59:37.120 [crypto] Errorf -> ERRO 02e [validator.mytest_vp0] Failed getting enrollment certificate [id=mytest_vp0]: [rpc error: code = 2 desc = Identity lookup error: sql: no rows in result set] vp0_1 | 03:59:37.120 [crypto] Errorf -> ERRO 02f [validator.mytest_vp0] Failed retrieving enrollment data [rpc error: code = 2 desc = Identity lookup error: sql: no rows in result set]. vp0_1 | 03:59:37.120 [crypto] Errorf -> ERRO 030 [validator.mytest_vp0] Failed registering node crypto engine [rpc error: code = 2 desc = Identity lookup error: sql: no rows in result set]. vp0_1 | 03:59:37.120 [crypto] Errorf -> ERRO 031 [validator.mytest_vp0] Failed registering peer [mytest_vp0]: [rpc error: code = 2 desc = Identity lookup error: sql: no rows in result set] vp0_1 | 03:59:37.120 [crypto] Errorf -> ERRO 032 [validator.mytest_vp0] Failed registering [mytest_vp0]: [rpc error: code = 2 desc = Identity lookup error: sql: no rows in result set] vp0_1 | 03:59:37.120 [crypto] RegisterValidator -> ERRO 033 Failed registering validator [mytest_vp0] with name [mytest_vp0] [rpc error: code = 2 desc = Identity lookup error: sql: no rows in result set]. vp0_1 | Error: rpc error: code = 2 desc = Identity lookup error: sql: no rows in result set vp0_1 | Usage:

shaggy_kp
2017-01-23 04:04
My docker-compose.yml file is below:

shaggy_kp
2017-01-23 04:04
membersrvc: image: hyperledger/fabric-membersrvc ports: - "7054:7054" command: membersrvc vp0: image: hyperledger/fabric-peer ports: - "8050:7050" - "7051:7051" - "7053:7053" environment: - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=unix:///var/run/docker.sock - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_ID=vp0 - CORE_PEER_PKI_ECA_PADDR=membersrvc:7054 - CORE_PEER_PKI_TCA_PADDR=membersrvc:7054 - CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054 - CORE_SECURITY_ENABLED=true - CORE_SECURITY_ENROLLID=mytest_vp0 - CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT links: - membersrvc command: sh -c "sleep 40; peer node start --peer-chaincodedev"

ankitkamra
2017-01-23 04:08
@shaggy_kp what you are trying to do ? can you please explain about setup?

shaggy_kp
2017-01-23 04:09
I am just trying to start a fabric network with a single node and member services

shaggy_kp
2017-01-23 04:10
I'm using docker-compose up to start my peer and membersrvc containers

harsha544
2017-01-23 04:19
May be try this https://hub.docker.com/r/ibmblockchain/fabric-peer/ , it's simpler. And you have pre-defined docker-compose.yml files for 4X1 and 1X Blockchain Network.

shaggy_kp
2017-01-23 04:20
I have also tried those. At one point those docker-compose files worked for me but they too now give me the same error using both the 4x1 and 1x blockchain network

shaggy_kp
2017-01-23 04:21
A search on the web led me to one comment saying that I should add a delay in my docker-compose.yml file before starting my peer node. I have done this but it too is resulting in the same problem.

shaggy_kp
2017-01-23 04:22
command: sh -c "sleep 10; peer node start"

shaggy_kp
2017-01-23 04:22
I've increased this sleep time unto 40 but to no avail.

ankitkamra
2017-01-23 04:23
@shaggy_kp run following command and tell the output docker ps -s

shaggy_kp
2017-01-23 04:25
$ docker ps -s CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES SIZE

shaggy_kp
2017-01-23 04:25
nothing is listed

ankitkamra
2017-01-23 04:25
so you have not run docker-compose up command yet

ankitkamra
2017-01-23 04:26
please run docker-compose up then run above mentioned command

shaggy_kp
2017-01-23 04:27
fd1f0cb187e8 hyperledger/fabric-membersrvc "membersrvc" 10 minutes ago Up 51 seconds 0.0.0.0:7054->7054/tcp tmp_membersrvc_1 23 kB (virtual 1.42 GB)

ankitkamra
2017-01-23 04:28
run following commands:- docker exec -it tmp_membersrvc_1 rm -rf /var/hyperledger/production docker commit fd1f0cb187e8 hyperledger/fabric-membersrvc

ankitkamra
2017-01-23 04:29
after then stop existing docker-compose

ankitkamra
2017-01-23 04:29
again restart using docker-compose up

ankitkamra
2017-01-23 04:29
your problem will be resolved

shaggy_kp
2017-01-23 04:29
Just to be clear is it :

shaggy_kp
2017-01-23 04:30
docker exec -0t tmp_membersrvc_1 rm -rf /var/hyperledger/production

ankitkamra
2017-01-23 04:30
exec -it** not 0t

shaggy_kp
2017-01-23 04:30
That was a typo. There is a line wrap so I couldn't tell if that was two separate commands. Sorry, I'll run that.

ankitkamra
2017-01-23 04:31
both two are separate commands

shaggy_kp
2017-01-23 04:32
I'm restarting with docker-compose up but I got the same problem

nikeshgogia
2017-01-23 05:13
shaggy_kp can you share your docker-compose. yml file ?

hannes
2017-01-23 09:30
has joined #fabric

denisglotov
2017-01-23 10:15
hi! are there any preview sources of `1.0` to try?

john.d.sheehan
2017-01-23 11:39
Hi, using either of the following images, *hyperledger/fabric-peer:x86_64-0.6.1-preview*, or *ibmblockchain/fabric-peer:x86_64-0.6.1-preview*, I get the following error when I attempt to deploy chaincode, *11:26:44.521 [chaincode] Launch -> ERRO 058 launchAndWaitForRegister failed Error starting container: cannot normalise nothing*. The message appears on all (5) the peers

kirkwall
2017-01-23 11:50
has joined #fabric

gatakka
2017-01-23 12:46
has joined #fabric

shaggy_kp
2017-01-23 12:57
@nikeshgogia here is my docker-compose file

shaggy_kp
2017-01-23 12:57
membersrvc: image: hyperledger/fabric-membersrvc ports: - "7054:7054" command: membersrvc vp0: image: hyperledger/fabric-peer ports: - "7050:7050" - "7051:7051" - "7053:7053" environment: - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=unix:///var/run/docker.sock - CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_ID=vp0 - CORE_PEER_PKI_ECA_PADDR=membersrvc:7054 - CORE_PEER_PKI_TCA_PADDR=membersrvc:7054 - CORE_PEER_PKI_TLSCA_PADDR=membersrvc:7054 - CORE_SECURITY_ENABLED=true - CORE_SECURITY_ENROLLID=mytest_vp0 - CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT links: - membersrvc command: sh -c "sleep 20; peer node start --peer-chaincodedev"

shaggy_kp
2017-01-23 12:57
for a single peer node

vadim
2017-01-23 13:01
@shaggy_kp I think it should be test_vp0 in CORE_SECURITY_ENROLLID

thojest
2017-01-23 13:02
hey guys im having a problem using hfc sdk as an interface between my app and chaincode. im using hyperledger v0.6. The thing is, that I am unable to get errors with `invokeTx.on('error', function(results) {....})`

thojest
2017-01-23 13:03
where `var invokeTx = userObj.invoke(invokeRequest)`

thojest
2017-01-23 13:03
this only happens when using invoke. in the case of query everything works perfekt

thojest
2017-01-23 13:04
on error is never triggered in invokes

caroline.church
2017-01-23 13:04
has joined #fabric

shaggy_kp
2017-01-23 13:04
@vadim Thanks, however, that does not resolve the problem

vadim
2017-01-23 13:05
you still have “identity lookup error”?

thojest
2017-01-23 13:06
the funny thing is that i get the error in the log of the peer node but it is not caught by invokeTx.on('error', ....)

thojest
2017-01-23 14:16
is there anything known about this issue?

hashed_corey
2017-01-23 15:28
Got a question about TCerts ... how are child PreKeys distributed to auditors? Can anyone walk me through the flow?

tomthebuzz
2017-01-23 15:55
has joined #fabric

schristie
2017-01-23 16:26
What are some possible causes for a chaincode error like: `Chaincode handler FSM cannot handle message (RANGE_QUERY_STATE) with payload size (18) while in state: ready`? This is on the 0.6.1-preview peer in the hyperledger/fabric-peer docker image, using --peer-chaincodedev

schristie
2017-01-23 16:27
the deploy transaction seemed to work just fine, as do most invoke transactions; it's just the queries that fail

silliman
2017-01-23 16:31
@schristie this *could* be your problem: I've seen this where people are trying to use the v0.6 branch of the code and then are following the instructions in the v0.6 branch of the documentation, but....get twisted up because there are a couple spots in this doc where it has a wget (for the chaincode) and a git clone (for getting the fabric code available locally in order to build the chaincode) that refer to *master*. The problem is, that *master* is now v1.0 code. So, they are running Docker images with v0.6 code but when they build the chaincode locally, it incorporates v1.0 code in into it. The solution is, in the *wget* and the *git clone*, change *master* to *v0.6* in the path name. I am being purposely vague as to where this documentation is, because if I've guessed correctly, you know what I'm referring to, but if I've guessed wrong, it's something else and I don't want to lead you on a wild goose chase. I hope this helps.

schristie
2017-01-23 16:39
silliman: thanks

silliman
2017-01-23 16:41
@schristie yw, there's a decent chance that this is what you've run up against.

schristie
2017-01-23 16:46
are there any documents on migration from v0.6 to v1.0?

silliman
2017-01-23 16:58
@schristie Not that I'm aware of ... chaincode is expected to be able to migrate with minimal changes, but the underlying architecture of the fabric is quite different and so migration of the state data is not supported IIRC ... there are some demo apps that folks are working on migrating from 0.6 to 1.0 (e.g. car-lease-demo at https://github.com/IBM-Blockchain/car-lease-demo) so it's possible that someone may at some point produce a document on how to migrate chaincode from v0.6 to v1.0

det
2017-01-23 17:23
has joined #fabric

fmarino
2017-01-23 17:48
has joined #fabric

fmarino
2017-01-23 17:55
Hello everyone! I'm just trying make a docker-compose up to 4 peers with pbft consensus, but they're not communicating with each others, the error on VP logs is: chatWithPeer -> ERRO 030 Error creating connection to peer address vp0:7051: grpc: timed out when dialing On vp0 is: grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: write tcp 172.18.0.4:7051->172.18.0.6:48898: write: connection reset by peer" Can someone help me with this issue?

bcq
2017-01-23 19:59
https://hyperledger-fabric.readthedocs.io/en/v0.6/Setup/Chaincode-setup/#running-the-cli-or-rest-api > To log in through the REST API, send a POST request to the /registrar endpoint, containing the enrollmentID and enrollmentPW listed in the eca.users section of the membersrvc.yaml file. the link to membersrvc.yaml is broken, where can i find it?

amarpreet
2017-01-23 19:59
can someone explain to me the difference between a bank and institution re: membersrvc.yaml?

bcq
2017-01-23 20:00
amarpreet where did you find membersrvc.yaml?

amarpreet
2017-01-23 20:00
on the membersrvc

amarpreet
2017-01-23 20:00
i am building it via docker

bcq
2017-01-23 20:01


bcq
2017-01-23 20:06
hm. it's an archived file that isn't in the latest version of http://github.com/hyperledger/fabric

gvlax
2017-01-23 20:30
@thojest I think the different behaviour is caused by the fact that the invoke operation is async and query synch.

amarpreet
2017-01-23 20:35
is there currently (0.6) no redundancy in terms of the membersrvc?

bcq
2017-01-23 20:39
how do you use this? https://hyperledger-fabric.readthedocs.io/en/v0.6/API/MemberServicesAPI/ is this somehow available in one of the sdks?

ghaskins
2017-01-23 20:47
@fmarino master?

ghaskins
2017-01-23 20:48
there is a known issue affecting docker containers on master atm: https://jira.hyperledger.org/browse/FAB-1652

ghaskins
2017-01-23 20:48
it sounds like you might be impacted

ghaskins
2017-01-23 20:49
I have this patched locally, would be willing to share but its not super easy to incorporate

ghaskins
2017-01-23 20:49
hopefully, will get the fixes merged in the next few days

ghaskins
2017-01-23 20:49
PM me if you are desperate, I can walk you though the local patching

drteck
2017-01-23 20:57
has joined #fabric

ghaskins
2017-01-23 23:49
@muralisr: do you know if anyone uses the TLS features between chaincode container and peer?

ghaskins
2017-01-23 23:49
I'm in that code, and unless I am missing something, I suspect it is broken

ghaskins
2017-01-23 23:50
And thus I am guessing it's not used

chen.nie
2017-01-24 00:35
has joined #fabric

silliman
2017-01-24 02:41
@bcq membersrvcs from v0.6 is replaced by fabric-ca in v1.0, that's why you wouldn't see it in the latest verion of http://github.com/hyperledger/fabric which is v1.0

silliman
2017-01-24 02:44
@amarpreet AFAIK you're correct, there is no redundancy for membersrvc in 0.6, but don't worry, v1.0 membersrvc is replaced by fabric-ca and the design does allow for redundancy.

shaggy_kp
2017-01-24 03:29
@vadim Yes, I am. I suspecting that there is a mismatch between my fabric-peer fabric-membersrvc images and the version in my $GOPATH/src/github.com/hyperledger/fabric.

shaggy_kp
2017-01-24 03:29
I'm not sure if this is the case, but that is all that I can think of.

shaggy_kp
2017-01-24 03:30
Is the v1.0 version (or the latest on master) for the hyperledger/fabric and docker images stable enough to use?

shaggy_kp
2017-01-24 03:32
I'm unable to now even getting the Fabric Starter Kit to run using the instructions on http://hyperledger-fabric.readthedocs.io/en/v0.6/starter/fabric-starter-kit/

shaggy_kp
2017-01-24 03:38
My peer node container always fails to start

shaggy_kp
2017-01-24 03:54
I've made sure that I started with a clean slate ensuring I have no docker containers running and removed all of my fabric images. I am following the instructions for the Fabric Starter Kit step by step but my peer node container fails to start. I still get the following errors:

shaggy_kp
2017-01-24 03:54
peer | 03:53:27.897 [crypto] Debug -> DEBU 01f [validator.vp] TLS disabled... peer | 03:53:27.898 [crypto] Debug -> DEBU 020 [validator.vp] Getting ECA client...done peer | 03:53:27.899 [crypto] Errorf -> ERRO 021 [validator.vp] Failed requesting read certificate [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. peer | 03:53:27.899 [crypto] Errorf -> ERRO 022 [validator.vp] Failed requesting ECA certificate [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. peer | 03:53:27.899 [crypto] Errorf -> ERRO 023 [validator.vp] Failed getting ECA certificate [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. peer | 03:53:27.899 [crypto] Errorf -> ERRO 024 [validator.vp] Failed retrieving ECA certs chain [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. peer | 03:53:27.899 [crypto] Errorf -> ERRO 025 [validator.vp] Failed registering node crypto engine [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. peer | 03:53:27.899 [crypto] Errorf -> ERRO 026 [validator.vp] Failed registering peer [vp]: [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure] peer | 03:53:27.899 [crypto] Errorf -> ERRO 027 [validator.vp] Failed registering [vp]: [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure] peer | 03:53:27.899 [crypto] RegisterValidator -> ERRO 028 Failed registering validator [vp] with name [vp] [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. peer | Error: rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure

shaggy_kp
2017-01-24 04:00
The instructions in the Fabric Starter Kit is pulling the fabric-starter-kit, fabric-membersrvc, and fabric-peer images from latest. Can anyone help to determine if this is a problem with the actual images or is there something else in the setup on my local machine that I am missing or need to do?

sonyeric
2017-01-24 05:13
has joined #fabric

ibmamnt
2017-01-24 05:31
Docker has been upgraded to v1.13. Should we use this release ? (Ubuntu upgrade automatically upgrade to v1.13.x).

vigneswaran.r
2017-01-24 05:32
Hello, is it possible to hide (part of the) transaction details from some of the validating peers (in Fabric v0.6)? Eg., when competitors are running peer nodes in a blockchain setup, they may not be willing to reveal all the data to every other node. Whether, Fabric is suitable for such usecases?

ibmamnt
2017-01-24 06:19
@vigneswaran.r Probably, the right answer is separate business network while using the same infrastructures. competitor may join to network (say BizA), but can not join to (say BizB). If a company want to hide the data, all transaction goes to BizB network.

vigneswaran.r
2017-01-24 06:40
@ibmamnt Ok. So, by "separate business network", do you mean running multiple instances of blockchain (BizA, BizB) on the same infrastructure, and some companies are registered on BizA and some on BizB?

vadim
2017-01-24 08:06
@vigneswaran.r you can also encrypt it before writing it to the blockchain

ibmamnt
2017-01-24 08:21
@vigneswaran.r I meant about it. This may be good to take a look (though it is currently under discussion).

ibmamnt
2017-01-24 08:22
Multichannel Consensus and Ledgers


vigneswaran.r
2017-01-24 08:26
@ibmamnt Ok, I will look into it. Thanks.

vadim
2017-01-24 08:29
@ibmamnt according to that document, orderers still see all transactions and confidentiality is only on a peer level

vigneswaran.r
2017-01-24 08:29
@vadim You're right, we can do encryption. However, if we consider a simple scenario where A wants to transfer B some amount X, then even if we encrypt X, in order to execute the transaction (and make appropriate changes to the world state), all the VPs have to decrypt X. So, there is no way to hide X from the peers.

vadim
2017-01-24 08:32
I guess I can quote the paragraph from that document above: “Note that the consensus service receives all transactions for all chains, so confidentiality is only pertaining to the Peers and not the Orderers. This is fine when the consensus service is made up of trusted parties and regulatory bodies in a permissioned network; that is, the transactions are visible to them as business requirements. On the other hand, if the application doesn’t want the Orderers to see the content of transactions, it should utilize other techniques to hide the sensitive data such as hash or encryption. The Consensus Service acts as a trusted party. "

vadim
2017-01-24 08:33
so probably, this is very use case specific and sometimes the encryption will also be needed

vigneswaran.r
2017-01-24 08:37
@vadim Yeah, encryption is anyway preferred/needed to hide details from the other users of the blockchain (or from anyone who can read the blockchain). However, hiding it from some validating peers (in Fabric v0.6) doesn't seem to be possible.

thojest
2017-01-24 08:37
@gvlax ahh ok. but why doesnt it work?

vadim
2017-01-24 08:38
well it is possible, they just won’t be able to look inside the encrypted data and process it

vigneswaran.r
2017-01-24 09:01
@vadim In my understanding, VPs execute the chaincode. Typically, a transfer function in a chaincode expects to deduct money from the source account and add it to the destination account and update the worldstate accordingly. In order to achieve this, the chaincode requires X value (amount to be transferred) in unencrypted form.

vigneswaran.r
2017-01-24 09:03
So, either the peer (platform) has to do the decryption, or the chaincode has to do the decryption. I couldn't find any way to give the decryption keys to the chaincode without the peer's knowledge..

cyrg
2017-01-24 09:26
has joined #fabric

fmarino
2017-01-24 10:26
Hi, @ghaskins! Thanks for the answer! I'll wait bug fix for related issue, actually i'm not desperate, because I have a virtual machine which has a stable fabric image running ( i've backups of this vm too, of course) Regards!

nickmelis
2017-01-24 12:11
general question: do non validating nodes broadcast transactions to validating nodes only, or every node in the network?

garisingh
2017-01-24 14:29
@nickmelis - I would not worry too much about non-validating nodes at this point given we no longer have the concept in the latest version of the fabric, but to answer your question NVPs are basically like "clients" and they broadcast to one validating peer which is then responsible for distributing the tx to all peers.

nickmelis
2017-01-24 14:30
@garisingh are you saying there won’t be any NVP anymore? Can you explain a bit more?

garisingh
2017-01-24 14:45
the reality is that there never really was an NVP - well it never really need much other than act as a glorified client

garisingh
2017-01-24 14:45
have you taken a look at the new V1.0 architecture?

schaeff
2017-01-24 14:57
has joined #fabric

nickmelis
2017-01-24 14:57
mmh, not really. Where can I find it?

schaeff
2017-01-24 15:00
Hi everyone :slightly_smiling_face: Quick question: as I understand Fabric does not prevent non-deterministic chaincode to be pushed. Are there ways to make sure that does not happen (formal proofs?) or would hidden non-deterministic code be patched by “forking”? Thanks!

ghaskins
2017-01-24 15:02
baring bugs, non determinism would fail to reach consensus (with the exception of code that is just detministic enough to pass quorum thresholds)

schaeff
2017-01-24 15:05
Thanks, so what would you do in each case?

ghaskins
2017-01-24 15:26
well, in the new design, you would submit a request to N endorsers and they would presumably respond with a read-write-set proposal

ghaskins
2017-01-24 15:26
your client would see that the RWS doesnt match right there

ghaskins
2017-01-24 15:26
as far as how the orderer would respond if you tried to submit all the mismatched proposals, I am not sure

ghaskins
2017-01-24 15:27
anyone have more detail?


schaeff
2017-01-24 16:08
If I may ask another question: is the number and identity of validating peers dynamic in any way? If so, is there any governance on that or is it managed by the MembershipService centrally?

ghaskins
2017-01-24 16:38
historically (as in v0.6 and prior) it was centralized. It needs to be decentralized. I am not sure if this is captured in the v1.0 design or not

gmuecke
2017-01-24 16:42
has joined #fabric

sabaset
2017-01-24 16:54
has joined #fabric

ivan.sat
2017-01-24 16:57
has joined #fabric

silliman
2017-01-24 17:47
@schaeff I do not have a complete answer to your question but I can say with a fair degree of confidence that this will not be managed by membership service's replacement in v1.0, which is the fabric-ca component. In fact in v1.0 the fabric-ca is optional in that you can provide your own X.509 (and maybe other stuff in future) certs other ways (e.g. your own LDAP, your own favorite Certificate Authority).... fabric-ca just happens to be the "out-of-the-box" method to do this. This is in contrast to Fabric v0.6 where if you wanted to use security, you have to run membership services. Hope this helps a little bit.

meraki
2017-01-24 18:15
Hi, How to run a peer without security setup? [v1.0]

meraki
2017-01-24 18:16
Error trying to run a peer node using command: peer node start --peer-chaincodedev `2017-01-24 17:39:27.465 UTC [msp] getPemMaterialFromDir -> INFO 001 Reading directory /etc/hyperledger/fabric/msp/sampleconfig/cacerts panic: Fatal error when setting up MSP from directory /etc/hyperledger/fabric/msp/sampleconfig: err Could not load a valid ca certificate from directory /etc/hyperledger/fabric/msp/sampleconfig/cacerts, err Could not read directory open /etc/hyperledger/fabric/msp/sampleconfig/cacerts: no such file or directory, err /etc/hyperledger/fabric/msp/sampleconfig/cacerts`

meraki
2017-01-24 18:32
using Vagrant

muralisr
2017-01-24 18:33
@meraki can you try `CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/msp/sampleconfig peer node start --peer-chaincodedev` ?

meraki
2017-01-24 18:44
Yes that worked thanks!

meraki
2017-01-24 18:45
I see errors related to creating Couchdb in the logs

meraki
2017-01-24 18:45
*coucdb database

muralisr
2017-01-24 19:07
@meraki perhaps also ping fabric-ledger-dev for that ?

bcq
2017-01-24 19:08
@keithsmith: is fabric-ca the only way to issue certificates?

cdutra
2017-01-24 19:09
Hi guys. I am having problems to download Apache maven version 3.3.9 so I can't build fabric. Apparently the problem is in their servers. Does anyone know how to fix it? Tks.

meraki
2017-01-24 19:12
@muralisr ping fabric-ledger-dev for that --> Is it started along with the peer node?

bcq
2017-01-24 19:15
i'm trying to figure out how to issue certificates as seen in the attributes section of the documentation

meraki
2017-01-24 20:01
When I deploy chaincode_example02, I'm facing this error: `Error: Error getting broadcast client: Error connecting to 0.0.0.0:7050 due to grpc: timed out when dialing` .

meraki
2017-01-24 20:01
I've set CORE_PEER_ADDRESS=0.0.0.0:7051 which is the peer node address.

meraki
2017-01-24 20:03
Any pointer what I'm doing wrong?

yacovm
2017-01-24 22:55
Is there an ordering service alive? @meraki

meraki
2017-01-25 02:03
@yacovm No.. what are the steps to build and run an ordering service locally?

meraki
2017-01-25 02:27
I've now made sure that the ordering service is running. Steps followed: 1. make orderer-docker 2. docker run hyperledger/fabric-orderer

meraki
2017-01-25 02:30
Is this correct?

meraki
2017-01-25 02:30
But I am still facing the same error that I've mentionedabove

ghaskins
2017-01-25 02:33
@meraki are you running the peer in a docker container?

meraki
2017-01-25 02:33
No

ghaskins
2017-01-25 02:33
are you exposing the orderer's container's ports somehow?

ghaskins
2017-01-25 02:34
e.g. either with -p or some other docker method for exposing 7050?

meraki
2017-01-25 02:35
No.. is the orderer's default port 7050?

ghaskins
2017-01-25 02:39
yes, but docker wont surface the port on its own

ghaskins
2017-01-25 02:39
what is your topology? peer running native, orderer running in a container from the same host?

meraki
2017-01-25 02:39
So I tried running the docker image with port exposed. Still same issue.. Should I restart my peer?

ghaskins
2017-01-25 02:39
well, hold on...help me to understand the lay of the land first

meraki
2017-01-25 02:40
with -p 7050:7050

ghaskins
2017-01-25 02:40
so, as a sanity check: you should be able to do "nmap localhost -p7050-7054" and see the 7050 open if you do that

ghaskins
2017-01-25 02:40
can you try that?

meraki
2017-01-25 02:40
sure

ghaskins
2017-01-25 02:41
(and the orderer will need the -p7050:7050 before I expect that to work

meraki
2017-01-25 02:48
So 7050 is open.

meraki
2017-01-25 02:48
That's what I see.

meraki
2017-01-25 02:53
```CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ff1c7326fe18 hyperledger/fabric-orderer "/bin/sh -c orderer" 13 minutes ago Up 13 minutes 0.0.0.0:7050->7050/tcp elated_noyce```

meraki
2017-01-25 02:54
The ordering service is running correctly I believe from this.

donaldliu
2017-01-25 03:12
has joined #fabric

wwwangcai
2017-01-25 04:10
has joined #fabric

kuldeep
2017-01-25 04:52
has joined #fabric

praveenkakumanu
2017-01-25 06:15
has joined #fabric

amrith
2017-01-25 07:56
has joined #fabric

schaeff
2017-01-25 09:09
silliman: Thanks for the feedback :thumbsup:

miguelvaz
2017-01-25 11:03
has joined #fabric

denisglotov
2017-01-25 11:23
hi! can a chaincode deploy new chaincodes? I noted it can invoke other chaincodes with `shim.InvokeChaincode()`, but how to deploy one?

vadim
2017-01-25 11:37
you deploy a chaincode using standard methods, you get some long string in return, then you use that string to identify that chaincode in call to InvokeChaincode()

vadim
2017-01-25 11:39
something like stub.InvokeChaincode(otherChaincodeId, util.ToChaincodeArgs(”otherccfunc”, param1, param2))

vadim
2017-01-25 11:40
I think I misunderstood the question, sorry :slightly_smiling_face:

denisglotov
2017-01-25 11:47
thanks Vadim, I can deploy chaincodes manually. But I want my chaincode to deploy chaincodes for me.

vadim
2017-01-25 11:48
yes, I got it

vadim
2017-01-25 11:48
I think it might be hard if you need to sign the deployment transaction

vadim
2017-01-25 11:48
then your chaincode needs to have certificate with key

vadim
2017-01-25 11:49
so basically this certificate will be distributed across all nodes

denisglotov
2017-01-25 11:50
maybe without encryption?

vadim
2017-01-25 11:51
I think you can operate in this mode in v0.6, but I’m not sure this is possible in v1

denisglotov
2017-01-25 11:52
ok, will think, thank you

vadim
2017-01-25 11:53
but what use case would it be to deploy a chaincode from a chaincode?

denisglotov
2017-01-25 11:55
many use cases, with general idea: many smart contracts keep/manipulate their part of data, and one "root" contract to keep track of them all

vadim
2017-01-25 11:56
you think it won’t make sense to store that data in one contract instead?

denisglotov
2017-01-25 11:57
yes, an option, but then we will have 1 global smart contract.

denisglotov
2017-01-25 11:57
Probably nothing bad, but wanted to split the logic into smaller pieces

vadim
2017-01-25 11:58
well, technically, you can define you logic in classes in golang, and then just deploy one contract

vadim
2017-01-25 12:00
there might be a problem in case of multiple contracts when you, for example, want to update them. I don’t know whether some special updating mechanism is planned in Hyperledger, but if not, you need to deploy a new contract each time

vadim
2017-01-25 12:00
so if you have 100 contracts, you maybe need to deploy them 100 times

denisglotov
2017-01-25 12:01
I think it is a good point, thanks again. Just got used in Solidity (Etherium) that it allows to easily create sub-contracts.

vadim
2017-01-25 12:01
it does, yes, but there the problem with deploying x contracts instead of one is even more important, since it always costs a lot of gas

denisglotov
2017-01-25 12:03
permissioned blockchains don't waste gas :slightly_smiling_face:

vadim
2017-01-25 12:03
well yes, but still a lot of deploy transactions to handle

denisglotov
2017-01-25 12:04
you right, cannot find any downside of it now...

denisglotov
2017-01-25 12:08
btw, do you happen to know if `1.0` code preview available

vadim
2017-01-25 12:10
well I think they plan to release the images by the end of this month

vadim
2017-01-25 12:10
but if you want to try it now, you can just checkout the master branch from git and build it yourself

denisglotov
2017-01-25 12:11
master branch in github has version `0.7.0` (from `Makefie`)

vadim
2017-01-25 12:12
it has the new v1 architecture

praveenkakumanu
2017-01-25 12:12
Hi @vadim

praveenkakumanu
2017-01-25 12:12
Hi @denisglotov

vadim
2017-01-25 12:12
I think it just was not renamed for a while :wink:

praveenkakumanu
2017-01-25 12:12
Nice meeting you both of us

praveenkakumanu
2017-01-25 12:14
Sorry if interupted

vadim
2017-01-25 12:14
hi, no problem

denisglotov
2017-01-25 12:14
ah, I had this guess too :slightly_smiling_face:

praveenkakumanu
2017-01-25 12:14
You can go ahead

denisglotov
2017-01-25 12:17
welcome to join, @praveenkakumanu

praveenkakumanu
2017-01-25 12:17
Thanks @denisglotov

praveenkakumanu
2017-01-25 12:17
I am recently started working on #fabric

nikeshgogia
2017-01-25 14:30
Hi I am getting below message

nikeshgogia
2017-01-25 14:30
vp0_1 | 12:52:42.649 [peer] SendMessage -> DEBU 2997 Sending message to stream of type: DISC_GET_PEERS vp0_1 | 12:52:42.649 [peer] SendMessage -> DEBU 2998 Sending message to stream of type: DISC_PEERS vp0_1 | 12:52:42.902 [consensus/handler] HandleMessage -> DEBU 2999 Did not handle message of type DISC_PEERS, passing on to next MessageHandler vp0_1 | 12:52:42.902 [peer] HandleMessage -> DEBU 299a Handling Message of type: DISC_PEERS vp0_1 | 12:52:42.902 [peer] beforePeers -> DEBU 299b Received DISC_PEERS, grabbing peers message vp0_1 | 12:52:42.902 [peer] beforePeers -> DEBU 299c Received PeersMessage with Peers: peers:<ID:<name:"vp0" > address:"192.168.0.3:7051" type:VALIDATOR pkiID:"\010\332\316K\002\240\350-9\324\212\302\264\026\021\266\331:_\002V\231\177\353]:\224\305\276\255\3563" >

nikeshgogia
2017-01-25 14:30
IT SAYS Did not handle message of type DISC_PEERS, passing on to next MessageHandler

nikeshgogia
2017-01-25 14:30
My all nodes are on different cloud

nikeshgogia
2017-01-25 14:31
Any suggestion ?

thojest
2017-01-25 16:01
i accidently deleted my docker images

thojest
2017-01-25 16:01
but running `sudo make images`

thojest
2017-01-25 16:01
gives me latest not found error

thojest
2017-01-25 16:01
what is the problem here?

thojest
2017-01-25 16:02
i pulled all images with `sudo make` 2 months ago

thojest
2017-01-25 16:02
now it isnt working anymore

thojest
2017-01-25 16:16
i would be very hapy for an answer because im nearly getting mad since I have been working now for 3 weeks on this and i cannot run my app anymore

ghaskins
2017-01-25 16:25
@thojest what are you seeing?

thojest
2017-01-25 16:28
@ghaskins it tells me that there is a problem with the latest tag

ghaskins
2017-01-25 16:29
im sorry for your troubles...but to help you, can you be more specific? what branch are you working in? details like your environment, command(s) run, the error output, etc

ghaskins
2017-01-25 16:30
are you in vagrant? osx? something else?

thojest
2017-01-25 16:30
im running on ubuntu and I git cloned v0.6 and built everything my self

thojest
2017-01-25 16:30
no vagrant

thojest
2017-01-25 16:30
`sudo make images`

ghaskins
2017-01-25 16:30
ok, the commands/errors?

thojest
2017-01-25 16:30
wait a second

thojest
2017-01-25 16:32
cannot reproduce the error message at the moment because i changed something in my docker folder `/var/lib/docker`

thojest
2017-01-25 16:32
the problem is i think however

thojest
2017-01-25 16:33
that there is no latest tag for all the docker files anymore

thojest
2017-01-25 16:33
and when you enter e.g. `docker pull ......`

thojest
2017-01-25 16:33
it tries automatically to pull the latest version

ghaskins
2017-01-25 16:37
so, generally speaking: "latest" tags are a synthetic artifact of the build

ghaskins
2017-01-25 16:38
can you run "make clean images" and post the output?

thojest
2017-01-25 16:44
Building docker src-image docker build -t hyperledger/fabric-src build/image/src Sending build context to Docker daemon 12.22 MB Step 1 : FROM hyperledger/fabric-baseimage:latest Pulling repository http://docker.io/hyperledger/fabric-baseimage Tag latest not found in repository http://docker.io/hyperledger/fabric-baseimage Makefile:191: recipe for target 'build/image/src/.dummy' failed make: *** [build/image/src/.dummy] Error 1

thojest
2017-01-25 16:44
this is the error running `sudo make images`

thojest
2017-01-25 16:45
`sudo make clean images` works

thojest
2017-01-25 16:45
thanks a lot

thojest
2017-01-25 16:45
what is the difference?

thojest
2017-01-25 16:54
now i even cannot run `peer node start` anymore

ghaskins
2017-01-25 17:05
well, clean will clean up the local state

ghaskins
2017-01-25 17:05
i suspect you were in some funk and that forced the build to rebuild eveything

ghaskins
2017-01-25 17:05
note that the peer binary is not compiled as part of "make images", that only does the docker container

ghaskins
2017-01-25 17:05
in v0.6, you can do "make peer"

ghaskins
2017-01-25 17:06
in master, you can still do "make peer" but you can also do "make native" to build all the native binaries, including peer

ghaskins
2017-01-25 17:06
(which includes orderer, etc)

thojest
2017-01-25 17:44
@ghaskins so what can i do now to reverse `sudo make clean `

ghaskins
2017-01-25 17:52
take a look at the header for ./Makefile

ghaskins
2017-01-25 17:52
theres a number of targets available, depending on what you want

ghaskins
2017-01-25 17:52
from what you described, i think "make peer images" would do it

thojest
2017-01-25 17:54
thanks alot im trying it

thojest
2017-01-25 18:01
woow thanks a lot @ghaskins

thojest
2017-01-25 18:01
you really saved my evening :smile:

ghaskins
2017-01-25 18:01
yw

thojest
2017-01-25 18:01
app is working again

thojest
2017-01-25 18:02
one more question

thojest
2017-01-25 18:03
is it possible to get all the docker images without gitcloning the fabric source code and running `sudo make images`

ghaskins
2017-01-25 18:20
not fully, at least not yet

ghaskins
2017-01-25 18:20
we pushed v0.6 images to dockerhub, but its not really what I would call "turnkey"

ghaskins
2017-01-25 18:20
we will be fixing this in 1.0

ghaskins
2017-01-25 18:21
there are steps you could do to work with the dockerhub images without building from code, but it would take a few extraneous steps aside from the usual suspects "docker pull/run"

jonathanlevi
2017-01-25 19:01
*but its not really what I would call “turnkey”*

jonathanlevi
2017-01-25 19:01
@ghaskins: did I mention how much I like how you phrase things, sometimes? :wink:

ghaskins
2017-01-25 19:03
heh

pvishnum
2017-01-25 19:43
is anyone able to deploy go chaincode with latest code ?

markparz
2017-01-25 21:11

fbenhamo
2017-01-25 21:34
@pvishnum yes Tzipi and I managed to do it on commit 372adb4

fbenhamo
2017-01-25 21:34
both when running the peer and the orderer natively and within docker (in the second case, see tzipih comment on #fabric-dev)

wanghaidong
2017-01-26 03:30
has joined #fabric

nikeshgogia
2017-01-26 08:03
I seriously need help and if any body can help. I downloaded the Docker images supported by IBM 0.6 one as you mentioned. This does not work when pbft enabled on 4 nodes and all these nodes are on different cloud (AWS,RACKSPACE,BLUEBOX and SOFTLAYER) where i am making Softlayer as root node. Chaincode gets deployed but then not able to query it says -: { "jsonrpc": "2.0", "error": { "code": -32003, "message": "Query failure", "data": "Error when querying chaincode: Error:Failed to launch chaincode spec(Could not get deployment transaction for de67a47261ab91c0e012d770f59ac23b82a247e5b9a44a1632034fc974df925afc2c588682ac693d9365576c6be516fb44362f05cc815949a8a0e3d8b61d91ac - LedgerError - ResourceNotFound: ledger: resource not found)" }, "id": 5 } Has any one tried on realy 4 Nodes on different machine ?

nikeshgogia
2017-01-26 08:04
and when I implement this on NOOPS it works

ruslan
2017-01-26 08:23
unfortunately, peer TLS doesn’t work

ruslan
2017-01-26 08:24
when I try to execute deploy command (cli) I got message: Error: Error getting endorser client chaincode: Error trying to connect to local peer: grpc: timed out when dialing

ruslan
2017-01-26 08:24
- CORE_PEER_TLS_ENABLED=true - CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/testdata/server1.pem - CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/testdata/server1.key

miguelvaz
2017-01-26 09:25
@ghaskins thanks for the insight. working with @thojest on this. Not sure I understand. Are there any limitations on the images on dockerhub?

miguelvaz
2017-01-26 09:27
or do you just mean with reusing images?

mbaizan
2017-01-26 11:06
has joined #fabric

srm
2017-01-26 12:42
has joined #fabric

bmatsuo
2017-01-26 13:11
Is it possible to override the peer configuration `chaincode.car` using environment variables (for fabric v0.6.1)? I would have guessed `CORE_CHAINCODE_CAR= FROM ...` would do the trick but it doesn't appear to be working.

bmatsuo
2017-01-26 13:12
omg.. probably because it would be `CORE_CHAINCODE_CAR_DOCKERFILE=FROM ...`. Of course I don't realize that until seconds after I sent that last message.

bmatsuo
2017-01-26 13:16
Looks like that did it.. Sorry for the noise.

ghaskins
2017-01-26 13:16
cool

mcenatie
2017-01-26 13:36
has joined #fabric

forest14
2017-01-26 15:36
has joined #fabric

amarpreet
2017-01-26 15:43
hm, quick question. is it possible to run multiple chaincodes in v0.6?

jack.parkinson
2017-01-26 15:51
has joined #fabric

silliman
2017-01-26 16:14
@amarpreet yes you may. Most of the demo assets available focus on just their single chaincode, so that may have given you an impression you can only do one, but you can most certainly run multiple chaincodes on a single peer network in Fabric v0.6

amarpreet
2017-01-26 16:14
fantastic, thank you @silliman

marcusvcs
2017-01-26 19:26
Hi, I'm trying to understand the fabric-boilerplate example and I am not understanding what is the need of keyvalstore. I'm deploying locally. As far as I understood, after I enroll an user all I need is the enrollmentId to call the chaincode, is that correct?

marcusvcs
2017-01-26 19:27
So what's the need of storing the user certificate?

marcusvcs
2017-01-26 20:23
Changing my question: enrolling in a node using REST API is not the same as enrolling using HFC nodejs API?

jtrayfield
2017-01-26 20:49
has joined #fabric

baarif
2017-01-26 21:41
has joined #fabric

cyrax
2017-01-26 22:04
has joined #fabric

ghaskins
2017-01-26 22:17

ghaskins
2017-01-26 22:17
image publication to dockerhub/atlas still pending

ghaskins
2017-01-26 23:19

silliman
2017-01-27 00:30
@marcusvs Here are some notes I took from a few months back from a Slack chat...I didn't save the author's name but I suspect it was Gari Singh: You can enroll a user once as the enrollSecret is a one time password. - The Node SDK (hfc) and the REST API actually take different paths in how they work - The NodeSDK will enroll you and download the credentials locally (default is `/tmp/keyValueStore`). At this point, you are enrolled (so you can't enroll again) but your credentials are local to the SDK and now you can only use the SDK to invoke/query as the enrollID you used to enroll - The REST API works differently. We you call the `/registrar` endpoint via REST, what happens is the the peer actually acts as a "wallet" and enrolls you behind the scenes. So in this case, the credentials end up being stored on the peer itself (by default in the `/var/hyperledge/production/client` directory and in your case this would be inside the Docker container) so the bottom line is that if you enroll via HFC you can't use the ID via the REST API and vice versa - if you enroll via the REST API you can't use that ID via HFC

silliman
2017-01-27 00:31
@marcusvcs ^^

silliman
2017-01-27 00:32
@marcusvcs and from the same conversation I saved: Q: is there any difference how certificates are used via HFC and REST? A: interesting question - the answer is yes and no. With HFC, the certificates are directly used within the hfc code - meaning you'll actually be submitting signed transactions via GRPC to a fabric peer (and technically you could control usages of trasnacaction certificates, etc). When using the REST API, the crypto functions are delegated to the peer to act on your behalf (so you submit a REST call with SecureContext in it and then the peer takes that, converts it into a fabric transaction, signs it with the credentials it is storing on your behalf and then submits it) So in the end, the system will see the same certificates either way, just that HFC is a more direct and controlled path for a client

ty531
2017-01-27 01:16
has joined #fabric

ghaskins
2017-01-27 02:12
@cbf @garisingh 64MB compressed. Not too terrible: https://hub.docker.com/r/hyperledger/fabric-baseos/tags/

archivebot
2017-01-27 04:04
has joined #fabric

thiru
2017-01-27 04:52
has joined #fabric

thiru
2017-01-27 04:55
@silliman : Hi, Using HFC we can register new users and later we can enroll them but using REST API we can enroll already registered users. Is this correct?

conroydave
2017-01-27 05:21
has joined #fabric

conroydave
2017-01-27 05:21
hello everyone

conroydave
2017-01-27 05:22
learning fabric and am having some success getting the beginner tutorials running, how ever i am looking for advice on the best way to structure a proof of concept i am trying to build

conroydave
2017-01-27 05:23
tracking education for individuals

conroydave
2017-01-27 05:23
id like to be able to log completion of courses to a studentid

conroydave
2017-01-27 05:24
private chain, schools would be able to read/write/verify

conroydave
2017-01-27 05:24
student also able to view their own history

conroydave
2017-01-27 05:25
i am looking at the Car Lease example but that seems like a big of a jump from the getting started doc

silliman
2017-01-27 07:55
@thiru The first part of your statement is correct, not sure if the second part is. When you use the REST API, the /registrar endpoint will both register and enroll you. With HFC, I think that you can register a user as a separate call and then later enroll that user. (Of course you can do both at once with the SDK with a call to registerAndEnroll). So, i think what you're asking is, could I take a user that is only registered but not enrolled and use the REST API to finish the enrollment? Not sure- and, furthermore, since the REST API from v0.6 is deprecated and not available in v1.0, you're probably better off focusing on the SDK functionality anyway IMHO.

thiru
2017-01-27 08:00
Thanks for the response silliman.

thiru
2017-01-27 08:02
And one basic question i have is , right now we have a pre defined users mentioned in the memebersrvc.yaml file and i am guessing those users are already registered and we just enroll them to associate with ECert ...

thiru
2017-01-27 08:03
And using HFC we can regsitser new users also, is this assumption right?

silliman
2017-01-27 08:09
Here's my understanding of it. With the REST API, to use /registrar, the user you want to register has to be defined in membersrvc.yaml. But I think that technically that user isn't yet registered, not until you make the /registrar call. It's just that that user has to be in membersrvc.yaml. You can't dynamically define new users with the REST API. With the SDK on the other hand, you can create new users that aren't in membersrvc.yaml. I do believe though that with the SDK the administrative user has to be pre-defined in membersrvc.yaml. E.g. *admin* or *WebAppAdmin* which is typically used in the demo applications. And even though those admin users are pre-defined in membersrvc.yaml, I think you still have to make an SDK call to register them. That's why I don't consider a regular user who is pre-defined in membersrvc.yaml to be registered yet. That definition is just a pre-req for them to get successfully registered.

silliman
2017-01-27 08:17
Here's an analogy, it may not be perfect, but it's how I think about it.... *register* is like inviting somebody to a party. *enroll* is like accepting the invitation to the party. So you can't party until you're registered and enrolled. To take the analogy a step further. *membersrvc.yaml* is like a list of people to invite to the party (i.e., *register*), and the REST API way is kind of saying, I'm only going to invite people who are on that list you've given me, but with the SDK if you're an administrative user, you can invite anybody you want to the party.

conroydave
2017-01-27 08:48
as your party grows - can you edit the membersrvcs yaml ? do you have to make any changes to chain code?

thiru
2017-01-27 09:13
Yah that makes sense ..Thanks :slightly_smiling_face:

thiru
2017-01-27 09:14
And did anyone tried using HFC for creating new user?Have been getting below errors while doing it..

thiru
2017-01-27 09:15
protoRegistrar.setId({ id: registrar.getName() }); ^ TypeError: registrar.getName is not a function at MemberServicesImpl.register (/opt/test/node_modules/hfc/lib/hfc.js:1965:46) at Member.register (/opt/test/node_modules/hfc/lib/hfc.js:726:29) at Member.registerAndEnroll (/opt/test/node_modules/hfc/lib/hfc.js:785:14) at /opt/test/node_modules/hfc/lib/hfc.js:543:20 at /opt/test/node_modules/hfc/lib/hfc.js:464:13 at /opt/test/node_modules/hfc/lib/hfc.js:493:13 at /opt/test/node_modules/hfc/lib/hfc.js:886:13 at ReadFileContext.callback (/opt/test/node_modules/hfc/lib/hfc.js:2202:24) at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:365:13) E0127 09:15:08.147892304 4777 resolve_address_posix.c:126] getaddrinfo: Name or service not known

ruslan
2017-01-27 10:06
@ruslan uploaded a file: https://hyperledgerproject.slack.com/files/ruslan/F3Y0S7GCF/hash-of-blocks.png and commented: Why previous hash and Data hash are not equal? Fabric v1.0 latest build

vadim
2017-01-27 10:08
just a guess: probably, previousHash is a hash of the whole previous block, not just data

ruslan
2017-01-27 10:17
Yeah, cool, previous hash is equal to next block’s header hash

ruslan
2017-01-27 10:17
not a whole block but his header

ruslan
2017-01-27 10:18
orderer/ledger/ordererledger.go:65

vadim
2017-01-27 10:20
true, and also the block header includes the data hash: https://github.com/hyperledger/fabric/blob/master/protos/common/common.pb.go#L350

ruslan
2017-01-27 10:21
yes

ruslan
2017-01-27 10:21
thanks

willy
2017-01-27 10:24
has joined #fabric

maritere
2017-01-27 10:55
hi, i am trying to connect two peers in two AWS machines, is it possible?

shimo
2017-01-27 10:56
@maritere it’s working on our AWS. it should be.

shimo
2017-01-27 10:57
How can we keep users’ session between a client PC and a peer? We use CA and a client machine can connect to a peer by authorized by CA.

abhinav.garg
2017-01-27 11:17
how to create own rest api in hyperledger,pl let me know

marcusvcs
2017-01-27 11:42
@silliman thank you very much, I think I understood now

danacr
2017-01-27 12:01
has joined #fabric

marcusvcs
2017-01-27 13:23
Another question: using HFC nodejs API, it is possible to use the same user in multiples web servers, if I share the keyvalstore, that's right? Can I just copy the files in the keyvalstore to another web server or the servers need to see the exact same file?

garisingh
2017-01-27 13:27
@marcusvcs - sure - multiple instances can use copies of the same keystore

marcusvcs
2017-01-27 13:32
@garisingh so there is no need to synchronize the files, just a one time copy from a server to another will be enough?

rsarres
2017-01-27 13:33
has joined #fabric

garisingh
2017-01-27 13:34
yeah - as long at the enrollment certificate does not expire - at which point you'd need to update - but other than that no need to synchronize

hl.rose
2017-01-27 13:58
is the source code implementing the PBFT consensus algorithm publicly available? is it in the fabric/examples/chaincode/go/utxo/consensus/ directory on github? Thanks

silliman
2017-01-27 14:22
conroydave: you can, but I think you'd probably need to restart your membersrvc for it to pick up the new users. I haven't tried this but it should be easy enough for you to test.

garisingh
2017-01-27 14:31
@hl.rose - the PBFT implementation for v0.6 is is under `fabric/consensus` there is an SBFT implementation of the orderer for v1.0 in the master branch under `fabric/orderer`

hl.rose
2017-01-27 14:34
@garisingh thank you for pointing me to the directory

hoolet
2017-01-27 15:41
has joined #fabric

hoolet
2017-01-27 15:41
Hi

hoolet
2017-01-27 15:42
help!!! I can't find json and url for logout. I am doing the chaincode examples

garisingh
2017-01-27 15:58
@hoolet - just as a piece of advice, I would not logout unless you never intent to use the identity again

hoolet
2017-01-27 16:03
Sorry but I started by little with fabric. I am using tool for developer

hoolet
2017-01-27 16:04
and I have done the login

hoolet
2017-01-27 16:06
deploy, invoke, query

hoolet
2017-01-27 16:07
now i should log out

marcusvcs
2017-01-27 16:23
In HFC is it possible to read a block in the block chain like in the REST API?

cdaughtr
2017-01-27 17:03
has joined #fabric

jtrayfield
2017-01-27 17:59
I’m getting "Invalid hash algorithm” error from stub.VerifySignature()

matanyahu
2017-01-27 20:12
I am trying to set up an environment outside of vagrant. I installed go 1.6, cloned the latest fabric from http://gerrit.hyperledger.org/r/fabric, installed cpp gccgo "build-essential" libsnappy-dev zlib1g-dev libbz2-dev http://docker.io curl, rocksdb 4.1 and pip

matanyahu
2017-01-27 20:12
I then ran make peer, which ended up with the following error

matanyahu
2017-01-27 20:13

matanyahu
2017-01-27 20:13
what is that I am missing here?

matanyahu
2017-01-27 20:13
what is package “context”?

matanyahu
2017-01-27 20:31
after I installed go 1.7, I re-ran the setup which failed as well, although for different reasons

matanyahu
2017-01-27 20:31

matanyahu
2017-01-27 20:39
OK, I managed to overcome the problem by installing libltdl-dev

matanyahu
2017-01-27 20:40
it looks like *make membersrvc* is now replaced by *make orderer*

matanyahu
2017-01-27 20:57
do you know which branch should I clone from gerrit to have a version of fabric identical to the one used in Bluemix?

rkiouak
2017-01-27 21:00
has joined #fabric

morgenhund
2017-01-27 21:04
has joined #fabric

matanyahu
2017-01-27 22:00
I am trying to use this tutorial (http://hyperledger-fabric.readthedocs.io/en/v0.6/Setup/Chaincode-setup/#option-3-vagrant-development-environment) to build a network with docker compose but I am failing with the following error

matanyahu
2017-01-27 22:00

c0rwin
2017-01-27 22:01
@matanyahu run this and re-try `export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/msp/sampleconfig`

c0rwin
2017-01-27 22:02
@matanyahu oh, wait, are you running a `vagrant`?

matanyahu
2017-01-27 22:02
nope

matanyahu
2017-01-27 22:02
pure docker

matanyahu
2017-01-27 22:03
same effect


matanyahu
2017-01-27 22:03
wrong link


matanyahu
2017-01-27 22:03
I meant option 1

c0rwin
2017-01-27 22:03
I see

matanyahu
2017-01-27 22:05
wait

matanyahu
2017-01-27 22:05
do you think I should run some other setup commands before using docker?

matanyahu
2017-01-27 22:05
“opt/gopath/src/github.com/hyperledger/fabric” does not exist on my box

matanyahu
2017-01-27 22:06
my bad

matanyahu
2017-01-27 22:06
“/opt/gopath/src/github.com/hyperledger/fabric"

matanyahu
2017-01-27 22:06
exists

c0rwin
2017-01-27 22:08
no, no you fine, I think this is related to the problem you experiencing: https://hyperledgerproject.slack.com/archives/fabric-dev/p1485553656002189

c0rwin
2017-01-27 22:09
@matanyahu are you trying to run the latest?

matanyahu
2017-01-27 22:09
I did not make modifications to yaml file

matanyahu
2017-01-27 22:10
so I assume it downloads the most recent image

c0rwin
2017-01-27 22:10
I mean have you pulled the recent version from master?

matanyahu
2017-01-27 22:11
yep

matanyahu
2017-01-27 22:11
you think there is an incosistency?

c0rwin
2017-01-27 22:11
Oh, so you are looking into docs for v0.6


matanyahu
2017-01-27 22:12
initially I tried working with 1.0 so I installed go 1.7 and did git clone http://gerrit.hyperledger.org/r/fabric

matanyahu
2017-01-27 22:13
it was failing while making orderer peer

c0rwin
2017-01-27 22:13
try to run in inside the vagrant first

matanyahu
2017-01-27 22:13
so I decided to move back to 0.6


c0rwin
2017-01-27 22:13

c0rwin
2017-01-27 22:13
do you still have the latest?

matanyahu
2017-01-27 22:14
yes

c0rwin
2017-01-27 22:14
do you have vagrant installed?

matanyahu
2017-01-27 22:14
no, I wanted to install all components outside vagrant

matanyahu
2017-01-27 22:15
I thought that vagrant deployment is deprecated

matanyahu
2017-01-27 22:15
and that docker is a preferred option

matanyahu
2017-01-27 22:15
but it looks I am wrong

c0rwin
2017-01-27 22:15
no you are not, but currently you’d probably better to get it started using vagrant image

c0rwin
2017-01-27 22:17
basically need to wait for a few commits to get in

c0rwin
2017-01-27 22:17
meanwhile I can help to setup a small testbed with vagrant

matanyahu
2017-01-27 22:17
ok

matanyahu
2017-01-27 22:17
I used to use vagrant around 2-3 months ago

c0rwin
2017-01-27 22:17
so, do you have it installed?

matanyahu
2017-01-27 22:18
but it looks that many things changed in readthedocs since then

matanyahu
2017-01-27 22:18
no, I am doing everything from scratch

matanyahu
2017-01-27 22:19
let me set up vagrant environment

c0rwin
2017-01-27 22:19
k

matanyahu
2017-01-27 22:19
thanks

matanyahu
2017-01-27 22:35
it will be slightly more complicated with vagrant

c0rwin
2017-01-27 22:35
why?

matanyahu
2017-01-27 22:36
I switched from ubuntu to macos and I don’t have a prepared environment here. I also don’t have enough ram to run an ubuntu vm with nested virtualization


matanyahu
2017-01-27 22:36
It used to work around 1,5 months ago

matanyahu
2017-01-27 22:37
maybe it’s about avoiding to clone the master but instead, try to clone 0.6.1 image

matanyahu
2017-01-27 22:37

c0rwin
2017-01-27 22:38
Well, master is up to 1.0 version which is currently in dev stage

c0rwin
2017-01-27 22:38
so the manual you’ve just posted not really relevant

matanyahu
2017-01-27 22:38
that’s what I thought


c0rwin
2017-01-27 22:39
this one describes how to work with current `master`

c0rwin
2017-01-27 22:39
to keep using v0.6, yes you need to get 0.6.1 image

matanyahu
2017-01-27 22:41
let me try with 1.0 again

c0rwin
2017-01-27 23:01
@matanyahu run `brew install libtool` on you mac

c0rwin
2017-01-27 23:01

c0rwin
2017-01-27 23:01

2017-01-28 03:21
@spiro commented on @matanyahu’s file https://hyperledgerproject.slack.com/files/matanyahu/F3Y9A3ANA/-.txt: Me too!

conroydave
2017-01-28 03:57
i am checking out the boiler plate example, and have been able to make modifications to it to closely fit my needs

conroydave
2017-01-28 03:57
but i am still a bit confused on a few parts


conroydave
2017-01-28 03:58
This chaincode is responsible for getting/setting data… got that part

conroydave
2017-01-28 03:58
but I am unclear about the sections regarding Indexing

conroydave
2017-01-28 03:59
is indexing a feature of fabric? If so, what scenario would you need to reindex?

matanyahu
2017-01-28 09:47
@c0rwin : thanks for explanation, vagrant setup works fine

matanyahu
2017-01-28 09:49
so if I understand well, vagrant setup is a valid devenv installation method for fabric 0.6.1 whereas if I would like to play with 1.0 I need to set it up with docker compose. Is that a correct assumption?

garisingh
2017-01-28 10:34
@matanyahu - if you are not running on Linux, then for v0.6 Vagrant is your best bet (as a matter of fact it's really the only *supported / tested* development environment. With v1.0 (master branch), it's possible to do everything on your host with a few build utilities (e.g. make) , docker and docker-compose (and this is the preferred mechanism moving forward)

matanyahu
2017-01-28 16:07
thnx

karkal72
2017-01-28 17:00
has joined #fabric

ghaskins
2017-01-28 18:03
@matanyahu: to add to @garisingh, there is, and will likely aways be, a devenv on v1.0 going forward. The main difference is it is now optional.

ghaskins
2017-01-28 18:03
Also, in the near future, what is devenv will likely be reduced to a more simplified setup (e.g. basic xenial + make + docker + compose)

ghaskins
2017-01-28 18:04
but I envision it will continue to be an option for those in which it is less friction to "vagrant up" than it is to get those tools installed

ghaskins
2017-01-28 18:04
(perhaps windows?)

ghaskins
2017-01-28 18:05
though to be fair, I have no idea how well make/go/docker work in windows/cygwin these days. Maybe they are just as good as linux/osx

garisingh
2017-01-28 21:43
well we can make it work on Windows :wink:

garisingh
2017-01-28 21:43
:wink:

nikeshgogia
2017-01-29 06:55
Has any body implemented pbft successfully on 4 different vm each on different cloud ?

garisingh
2017-01-29 09:31
not sure about different clouds, but we've done it across multiple machines and datacenters. in your private ping you mentioned it works with NOOPs and that's not surprising because in NOOPs there's no requirement for deploy to work on multiple nodes - just the node on which you execute the deploy

garisingh
2017-01-29 09:31
the typical issue is making sure your peer nodes can actually communicate

garisingh
2017-01-29 09:36
1) I'll assume you can externally communicate with each peer - e.g. from your local computer you can reach the `/chain` endpoint(s) on each of your peers 2) If so, can you also check the `/network/peers` endpoint(s) on each peer?

conroydave
2017-01-29 12:09
i am trying to add an authorized user via the fabric API

conroydave
2017-01-29 12:10
i was able to create them, but unable to enroll

garisingh
2017-01-29 12:12
@conroydave - which version of fabric are you using and can you add some more detail as to what you are doing and what error(s) you are seeing?

conroydave
2017-01-29 12:13
running a modified version of this: https://github.com/IBM-Blockchain/fabric-boilerplate

conroydave
2017-01-29 12:14
using rest i am able to build a user object outside of the system

conroydave
2017-01-29 12:15
and then pass it into the chain code with the add_user function


conroydave
2017-01-29 12:15
on the invoke.go page linked

conroydave
2017-01-29 12:15
the creation seems to work, but when i try to login to the node front end

conroydave
2017-01-29 12:16
i get” Failed to get mynewuser ---> user is not yet registered and enrolled

conroydave
2017-01-29 12:16
running docker, fabric v0.6.1-

conroydave
2017-01-29 12:22
is it not possible to add users to a chain if they are not in the initial membersyaml file

arner
2017-01-29 13:34
@conroydave Using the webAppAdmin user you can register and enroll new users, also if they're not in the membersc.yml. You can find the function to do so in blockchain.js. The user struct in the chaincode is there just to hold the metadata and to link to other structs.

jaro
2017-01-29 14:25
has joined #fabric

thiru
2017-01-29 14:25
@arner

thiru
2017-01-29 14:26
I Have been using HFC for creating new user?Have been getting below errors while doing it.. [2:45] protoRegistrar.setId({ id: registrar.getName() }); ^ TypeError: registrar.getName is not a function at MemberServicesImpl.register (/opt/test/node_modules/hfc/lib/hfc.js:1965:46) at Member.register (/opt/test/node_modules/hfc/lib/hfc.js:726:29) at Member.registerAndEnroll (/opt/test/node_modules/hfc/lib/hfc.js:785:14) at /opt/test/node_modules/hfc/lib/hfc.js:543:20 at /opt/test/node_modules/hfc/lib/hfc.js:464:13 at /opt/test/node_modules/hfc/lib/hfc.js:493:13 at /opt/test/node_modules/hfc/lib/hfc.js:886:13 at ReadFileContext.callback (/opt/test/node_modules/hfc/lib/hfc.js:2202:24) at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:365:13) E0127 09:15:08.147892304 4777 resolve_address_posix.c:126] getaddrinfo: Name or service not known

thiru
2017-01-29 14:26
hfc@0.6.1 am using

thiru
2017-01-29 14:27
tried with Bluemix hyperledger instance tried with my own setup

thiru
2017-01-29 14:27
no luck..any idea why would we get this?

arner
2017-01-29 14:28
How did you assign the registrar variable? Via chain.getRegistrar()? How does the object ‘registrar’ look?

thiru
2017-01-29 14:29
console.log("enrolling user admin ..."); // Enroll "admin" which is preregistered in the membersrvc.yaml /*chain.enroll("admin", "Xurw3yU9zI0l", function(err, admin) { if (err) { console.log("ERROR: failed to register admin: %s",err); process.exit(1); }*/ // Set this user as the chain's registrar which is authorized to register other users. chain.setRegistrar("admin"); var userName = "JohnDoe"; // registrationRequest var registrationRequest = { enrollmentID: userName, affiliation: "bank_a" }; chain.registerAndEnroll(registrationRequest, function(error, user) { if (error) throw Error(" Failed to register and enroll " + userName + ": " + error); console.log("Enrolled %s successfully\n", userName); deploy(user); });

arner
2017-01-29 14:31
You need to set the registrar to the admin object instead of the string “admin"

thiru
2017-01-29 14:32
ok..we need to get the object from getRegistrar?

arner
2017-01-29 14:32
I think this should help: change chain.setRegistrar(”admin"); to chain.setRegistrar(admin);

thiru
2017-01-29 14:37
Yah it was like the same earlier as i was getting compilation error saying "admin not declared" i changed it

thiru
2017-01-29 14:37
what is this admin object class?

cybersphaker
2017-01-29 15:19
has joined #fabric

matanyahu
2017-01-29 19:44
Hi, I deployed peer server version 0.7.0-snapshot-cb46696 with Vagrant and when I try to register a user from inside a Vagrant VM with the command _peer network login <username>_ , the command fails with an information that there is no such switch as _network_

leapingfrogs
2017-01-29 19:45
has joined #fabric

arner
2017-01-29 20:00
@thiru it’s a Member: https://github.com/hyperledger/fabric/blob/v0.6/sdk/node/src/hfc.ts#L831. Just put it inside the callback after the chain.enroll function.

kayad
2017-01-29 20:24
has joined #fabric

matanyahu
2017-01-29 20:52
I want to install Fabric 0.6 and I followed the readthedocs manual for v0.6. For both vagrant and docker deployments it is suggested to clone the latest repo which obviously is not 0.6 but 1.0 (actually 0.7.0-snapshot-cb46696). The latest master is problematic because it does not seem to have the same commandlets for _peer_

matanyahu
2017-01-29 20:53
so my simple question is: how can I make sure I deploy Fabric 0.6 instead of 1.0, with old style membership services and peer commands such as peer network...etc.

matanyahu
2017-01-29 20:55
my aim is to build a network closest to what is available on bluemix developer account, i.e. 4 nodes + CA. This configuration is well described in $GOPATH/src/github.com.../fabric/bddtests/...docker-compose-4-consensus-bath.yml

arner
2017-01-29 21:01
You could checkout the 0.6 branch, it’s in the repo. Or if it’s just about creating a network the easiest way is to use the official images on Dockerhub or the ones from Yeasy (https://github.com/yeasy/docker-compose-files/tree/master/hyperledger).

matanyahu
2017-01-29 21:04
@arner: thanks for links. I would like to try checking out the 0.6 branch. Can you help me with the url to be used with git clone ?

matanyahu
2017-01-29 21:31
@arner: I used your scripts, they work perfectly fine, thanks!

ibmamnt
2017-01-30 04:32
I run latest fabric with node-sdk unit test. I got this error in end-to-end.js. Should I wait a couple of days for beta 1 ? ```Validating transaction vscc tx validate vp0_1 | 2017-01-30 04:28:26.995 UTC [txvalidator] VSCCValidateTx -> INFO 2a8 [XXX remove me XXX] Transaction type, ENDORSER_TRANSACTION vp0_1 | 2017-01-30 04:28:26.995 UTC [txvalidator] call32 -> DEBU 2a9 END Block Validation vp0_1 | panic: runtime error: invalid memory address or nil pointer dereference vp0_1 | [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x8d65a7]```

passkit
2017-01-30 10:20
has joined #fabric

passkit
2017-01-30 10:24
https://hyperledger-fabric.readthedocs.io/en/latest/Setup/Network-setup/#setting-up-a-network This page provides network setup instruction for the 0.6 architecture. Is there similar documentation for 1.0?

yuryandreev
2017-01-30 12:40
What is difference between fabric-ca and fabric-cop?

garisingh
2017-01-30 12:42
`fabric-ca` is the new name for the artist formerly known as `fabric-cop`

garisingh
2017-01-30 12:43
and the `fabric-ca` repo is where all the latest development now happens

yuryandreev
2017-01-30 12:45
Thanks. Can we close repo https://github.com/hyperledger/fabric-cop, or change README and description

yuryandreev
2017-01-30 12:46
confuse

yuryandreev
2017-01-30 12:48
will be fabric-ca available in v1.0?

pd93
2017-01-30 13:14
@yuryandreev fabric-ca is a pluggable Certificate Authority for fabric. It does not come packaged with v1 (like `membersrvc` did for v0.6). This is so other CA's can be used if needed. Of course, you can use it with v1 though As for the `cop` repo, It was only discontinued just over a week ago, I imagine the project maintainers will take it down in due course. If not, then I agree. It should have a notice that points people to the new `ca` repo

ruslan
2017-01-30 13:49
Let’s imagine a situation: we have a network of 4 commiter-peers, 3 of them approve transaction, but fourth rejects (because it’s hacked by a bad guy), What would be next? Transaction will be rejected?

vadim
2017-01-30 13:52
I guess it’s related to the "fault tolerance” parameter of the SBFT orderer config (https://github.com/hyperledger/fabric/blob/master/orderer/orderer.yaml#L134)

ruslan
2017-01-30 13:53
Yes, but in v1.0 we have no sbft implementation in orderer (but we have a separate app ‘simplebft’)

ruslan
2017-01-30 13:53

vadim
2017-01-30 13:54
I see SBFT parameters and config in the orderer

vadim
2017-01-30 13:54
I think it’s implemented


ruslan
2017-01-30 13:58
I see too, but I’ve found this part of code: switch conf.Genesis.OrdererType { case ConsensusTypeSolo, ConsensusTypeSbft: case ConsensusTypeKafka: bs.minimalItems = append(bs.minimalItems, sharedconfig.TemplateKafkaBrokers(conf.Kafka.Brokers)) default: panic(fmt.Errorf("Wrong consenter type value given: %s", conf.Genesis.OrdererType)) }

ruslan
2017-01-30 13:58
orderer/common/bootstrap/provisional/provisional.go

vadim
2017-01-30 13:58
what’s wrong with it?

tuand
2017-01-30 14:01
@ruslan @vadim use #fabric-consensus-dev for bft questions

ruslan
2017-01-30 14:01
Okay, I got answer from @vadim (thanks)

tuand
2017-01-30 14:02
we're concentrating on the kafka orderer right now . A couple folks are working on sbft @hgabor @vukolic ^^^

matanyahu
2017-01-30 14:17
Do we have any reference data about ledger performance for Fabric 0.6 & Fabric 1.0 with consensus and CA enabled?

matanyahu
2017-01-30 14:25
in terms of tx/s

sagmeister
2017-01-30 14:49
has joined #fabric

cedoor
2017-01-30 14:56
has joined #fabric

cedoor
2017-01-30 15:03
Hello, i have a problem with fabric v0.6. When i make a post with this json : { "jsonrpc": "2.0", "method": "deploy", "params": { "type": 1, "chaincodeID":{ "name":"mycc" }, "ctorMsg": { "function":"init", "args":["a", "1000", "b", "2000"] }, "secureContext": "lukas" }, "id": "1" } in the json response the status.status is always "OK" . Also when i add some parameters. Why? Thanks

cbf
2017-01-30 16:35
@yuryandreev to be clear, fabric-ca will be published concurrently with the other Fabric component images (fabric-peer, fabric-orderer, etc etc) as a set.

ghaskins
2017-01-30 16:44
@cedoor deploy/invoke are async, so what you are seeing is basically a receipt that the peer network accepted your transaction

ghaskins
2017-01-30 16:45
if you want to know if it actually worked, use the events mechanism

bmatsuo
2017-01-30 17:39
@ghaskins ah, events. I was wondering how I would confirm deployment completed without a lot of work. Thanks for the tip.

ghaskins
2017-01-30 18:00
np, and its fully integrated into the v0.6 SDK

ghaskins
2017-01-30 18:00
ive used them

matanyahu
2017-01-30 19:25
can anyone redirect me to a documentation for Fabric which describes in detail how data is committed to the underlying database on each peer after a consensus is reached?

ghaskins
2017-01-30 21:55
@cbf is anyone aware that some of the doc links are currently broken?


ghaskins
2017-01-30 21:55
for example, though there are others

cbf
2017-01-30 21:55
yes

ghaskins
2017-01-30 21:55
ok

ghaskins
2017-01-30 22:01
@ghaskins uploaded a file: https://hyperledgerproject.slack.com/files/ghaskins/F3Z6P2C7R/hyperledger-fabric-readthedocs.pdf and commented: Scan as of 1/30 5pm ET

patchpon
2017-01-31 01:17
has joined #fabric

ramesh
2017-01-31 04:14
I did a refresh on the *go report* card and now go report is showing A+ grade but documentation is showing C

abhinav.garg
2017-01-31 05:33
Hi, In car lease demo, is the validation of transaction being contribute by all,i.e as all are involved under single transaction or not?

shawn
2017-01-31 06:15
has joined #fabric

raja_boini
2017-01-31 08:48
has joined #fabric

gvlax
2017-01-31 08:51
Hi, I am trying to understand the idea of endorsing transactions by dedicated peers. While the example described in the `https://github.com/hyperledger/fabric/blob/master/proposals/r1/Next-Consensus-Architecture-Proposal.md` document about a required endorser set is quite clear, I wonder if a endorsement logic can for example do such things like (see _chaincode_example0_) "if a value A is even and a value B is odd then return not valid transaction otherwise return valid trans. " ? I am not sure if I correctly interpret the whole idea.

manu
2017-01-31 14:00
has joined #fabric

jonas.hedin
2017-01-31 14:41
has joined #fabric

thojest
2017-01-31 18:19
hi everybod i have the following problem

thojest
2017-01-31 18:20
im using hyperledger v0.6 and want to have 4 peer nodes and 1 membersrvc in docker containers

thojest
2017-01-31 18:20
for that im using the following docker-compose.yml

thojest
2017-01-31 18:20
vp0: image: hyperledger/fabric-peer ports: - "7050:7050" - "7051:7051" environment: - CORE_PEER_ID=vp0 - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=unix:///var/run/docker.sock - CORE_LOGGING_LEVEL=INFO command: sh -c "sleep 10; peer node start" volumes: - /home/hyper/go/src/4ndappsettlement:/opt/gopath/src/4ndappsettlement links: - mem vp1: image: hyperledger/fabric-peer environment: - CORE_PEER_ID=vp1 - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=unix:///var/run/docker.sock - CORE_LOGGING_LEVEL=INFO - CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051 command: sh -c "sleep 10; peer node start" links: - vp0 vp2: image: hyperledger/fabric-peer environment: - CORE_PEER_ID=vp2 - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=unix:///var/run/docker.sock - CORE_LOGGING_LEVEL=INFO - CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051 command: sh -c "sleep 10; peer node start" links: - vp0 vp3: image: hyperledger/fabric-peer environment: - CORE_PEER_ID=vp3 - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=unix:///var/run/docker.sock - CORE_LOGGING_LEVEL=INFO - CORE_PEER_DISCOVERY_ROOTNODE=vp0:7051 command: sh -c "sleep 10; peer node start" links: - vp0 mem: image: hyperledger/fabric-membersrvc command: sh -c "sleep 3; membersrvc" ports: - "7054:7054"

thojest
2017-01-31 18:21
then I want to `peer network login admin` from the host machine

thojest
2017-01-31 18:21
and i get the following error

thojest
2017-01-31 18:21
vp0_1 | 18:21:21.505 [crypto] Errorf -> ERRO 01a [client.admin] Failed requesting read certificate [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp0_1 | 18:21:21.505 [crypto] Errorf -> ERRO 01b [client.admin] Failed requesting ECA certificate [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp0_1 | 18:21:21.505 [crypto] Errorf -> ERRO 01c [client.admin] Failed getting ECA certificate [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp0_1 | 18:21:21.505 [crypto] Errorf -> ERRO 01d [client.admin] Failed retrieving ECA certs chain [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp0_1 | 18:21:21.505 [crypto] Errorf -> ERRO 01e [client.admin] Failed registering node crypto engine [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure]. vp0_1 | 18:21:21.505 [crypto] Errorf -> ERRO 01f [client.admin] Failed registering client [admin]: [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure] vp0_1 | 2017/01/31 18:21:21 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp [::1]:7054: getsockopt: connection refused"; Reconnecting to {"localhost:7054" <nil>} vp0_1 | 2017/01/31 18:21:21 Failed to dial localhost:7054: grpc: the connection is closing; please retry. vp0_1 | 18:21:21.505 [crypto] RegisterClient -> ERRO 020 Failed registering client [admin] with name [admin] [rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure].

thojest
2017-01-31 18:22
i suspect that im doing something wrong with my docker-compose. can u plz help me

thojest
2017-01-31 18:22
all security features like tls and so on are deactivated

thojest
2017-01-31 18:23
and i suspect that there is problem in the connetion between the rootnode and the membersrvc

madhava
2017-01-31 19:19
Hi All, have created a similar project like "asset_management_interactive" in v0.6 and when i try to run the app am getting below error, could some one help me to resolve the issues "2017/01/31 15:32:00 setting Number of procs to -1, was 1 2017/01/31 15:32:00 Failed deploying [%s] rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure 2017/01/31 15:32:00 Failed initiliazing NVP [%s] rpc error: code = 14 desc = grpc: RPC failed fast due to transport failure"

madhava
2017-01-31 19:19
am running fabric on only one node

markparz
2017-01-31 20:14
Check out the latest ledger playback w/couchdb! https://youtu.be/XoW9gjAH93k … if you haven’t subscribed to the youtube channel do so for auto notifications at https://www.youtube.com/channel/UCCFdgCWH_1vCndMPVqQlwZw

conroydave
2017-02-01 01:06
try fully qualified ip addresses intead of hostnames

derick.tan
2017-02-01 07:24
has joined #fabric

anrodon
2017-02-01 07:50
Hey guys, Where can I find documentation about how to deploy a production Fabric Network?

siddhid
2017-02-01 08:55
has joined #fabric


thojest
2017-02-01 09:24
are there any solutions? tried out the comment but didnt work for me

thojest
2017-02-01 09:32
@conroydave hmm what exactly do you mean by that?

pd93
2017-02-01 10:01
@thojest I think @conroydave is suggesting using the IP address when specifying the connection to the peer/membersrvc rather than the host name. eg.. `192.17.0.2:7054` being an IP.. `vp0` / `membersrvc` (`mem` in your example) being a host name. The SO post you linked has a comment that suggests the same thing and worked.

thojest
2017-02-01 10:04
@pd93 so in the docker-compose file you mean this

thojest
2017-02-01 10:05
172.17.0.2: image: hyperledger/fabric-peer ports: - "7050:7050" - "7051:7051" environment: - CORE_PEER_ID=vp0 - CORE_PEER_ADDRESSAUTODETECT=true - CORE_VM_ENDPOINT=unix:///var/run/docker.sock - CORE_LOGGING_LEVEL=INFO command: sh -c "sleep 10; peer node start"

pd93
2017-02-01 10:09
I actually use hostnames and can't seem to replicate this issue, so I'm not sure, but I would suspect it's more referring to links and environment variables.. neither @conroydave or the SO answer specified precisely what to change I would just try a few combinations. Or start from scratch with a docker-compose that you know works.

thojest
2017-02-01 10:11
@pd93 thx a lot.

thojest
2017-02-01 10:11
im trying combinations for 2 hours now :smile:

thojest
2017-02-01 10:12
@pd93 but besides from the hostname thing, my docker-compose file is ok?

thojest
2017-02-01 10:12
or am i doint something completely wrong?

thojest
2017-02-01 10:12
is it a difference if you link A to B or B to A in docker-compose?

thojest
2017-02-01 10:12
am i missing some configurations for membersrvc?

pd93
2017-02-01 10:13
Just having a look at mine now to see any differences (Not that mine is necessarily perfect)

pd93
2017-02-01 10:13
I have links to membersrvc from each peer

thojest
2017-02-01 10:14
ahh ok

thojest
2017-02-01 10:14
but all other peers only have one connection to the root node?

pd93
2017-02-01 10:14
Correct (except the root node itself of course)

thojest
2017-02-01 10:15
well the network of my peer node works well

thojest
2017-02-01 10:15
the problem is this membersrvc

siddhid
2017-02-01 10:15
Hi Guys I have been trying to node js fabric SDK for fabric 1.0 from following link https://github.com/hyperledger/fabric-sdk-node I have followed all the steps mentioned on the link. When I try to run command node test/unit/end-to-end.js I get the following error error: [Chain.js]: Sending the deployment proposal failed. Error: TypeError: Cannot read property 'toArray' of null at EC.sign (/root/fabric-sdk-node-master/node_modules/elliptic/lib/elliptic/ec/index.js:99:30) at CryptoSuite_ECDSA_AES.sign (/root/fabric-sdk-node-master/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:289:25) at Signer.sign (/root/fabric-sdk-node-master/node_modules/fabric-client/lib/msp/identity.js:168:28) at SigningIdentity.sign (/root/fabric-sdk-node-master/node_modules/fabric-client/lib/msp/identity.js:204:23) at Chain._signProposal (/root/fabric-sdk-node-master/node_modules/fabric-client/lib/Chain.js:1300:29) at /root/fabric-sdk-node-master/node_modules/fabric-client/lib/Chain.js:964:37 error: [Chain.js]: Building the deployment proposal failed. Error: TypeError: Cannot read property 'toArray' of null at EC.sign (/root/fabric-sdk-node-master/node_modules/elliptic/lib/elliptic/ec/index.js:99:30) at CryptoSuite_ECDSA_AES.sign (/root/fabric-sdk-node-master/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:289:25) at Signer.sign (/root/fabric-sdk-node-master/node_modules/fabric-client/lib/msp/identity.js:168:28) at SigningIdentity.sign (/root/fabric-sdk-node-master/node_modules/fabric-client/lib/msp/identity.js:204:23) at Chain._signProposal (/root/fabric-sdk-node-master/node_modules/fabric-client/lib/Chain.js:1300:29) at /root/fabric-sdk-node-master/node_modules/fabric-client/lib/Chain.js:964:37

thojest
2017-02-01 10:16
@pd93 can you maybe show me your docker-compose file?

pd93
2017-02-01 10:16
@siddhid #fabric-sdk-node will be able to help best

siddhid
2017-02-01 10:17
@pd93 thanks :slightly_smiling_face:

pd93
2017-02-01 10:20
@thojest grpc 14 implies it can't reach the membersrvc peer. I think it might be a case of exposing port 7054

pd93
2017-02-01 10:20
give me a sec to remove some sensitive comments and ill send them your way :stuck_out_tongue:

thojest
2017-02-01 10:21
@pd93 thx a lot

thojest
2017-02-01 10:21
vp0_1 | 2017/01/31 18:21:21 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp [::1]:7054: getsockopt: connection refused"; Reconnecting to {"localhost:7054" <nil>} vp0_1 | 2017/01/31 18:21:21 Failed to dial localhost:7054: grpc: the connection is closing; please retry.

thojest
2017-02-01 10:21
why the peer node trying to reach membersrvc on localhost?

pd93
2017-02-01 10:23
@pd93 uploaded a file: https://hyperledgerproject.slack.com/files/pd93/F3ZAAUG0J/compose.zip and commented: This is split into 3 files. A template for peers, a template for the membersrvc and the actual docker-compose which extends from these tempaltes (means less code redundancy)

thojest
2017-02-01 10:26
thanks for the file really helps me alot not only for this problem

thojest
2017-02-01 10:27
is there a differnece between my port mapping and your expose?

pd93
2017-02-01 10:29
Yes there is... have a look here: https://docs.docker.com/compose/compose-file/

pd93
2017-02-01 10:29
`expose`: Expose ports without publishing them to the host machine - they’ll only be accessible to linked services. Only the internal port can be specified.

pd93
2017-02-01 10:30
port mapping is mapping the container port to a port on the host

pd93
2017-02-01 10:31
Also, yeah I spent a long time learning how they work. Those are actually based on the yeasy docker-compose files. Helped me a lot. Especially with the file separation and understanding what each bit did. (Hence the comments)

thojest
2017-02-01 10:32
hmm so when i try to enroll a user

thojest
2017-02-01 10:33
i make a request to the peer node and the peer node communicates with membersrvc?

pd93
2017-02-01 10:35
Yes. You can either do this through the container with the CLI (`docker exec -i <container> /bin/bash && peer network login admin <secret>`) which is directly telling a peer to communicate with membersrvc... or through an SDK. which will redirect your request to one of its connected peers and then to membersrvc

thojest
2017-02-01 10:36
i think the problem i have is the communication between membersrvc and peer

pd93
2017-02-01 10:36
Are you still having the same issue with my compose files?

thojest
2017-02-01 10:37
im using hyperledger v0.6

thojest
2017-02-01 10:37
so i dont think they ll work will they=?

pd93
2017-02-01 10:37
I'm also using 0.6

thojest
2017-02-01 10:37
ahhh ok

thojest
2017-02-01 10:37
i try it out now

pd93
2017-02-01 10:37
I won't be using v1 until a release candidate comes out

thojest
2017-02-01 10:43
hmm i get an error and i think that has to do with the verison of the dockerfile

pd93
2017-02-01 10:43
What system are you running docker on?

pd93
2017-02-01 10:43
version of docker etc?

thojest
2017-02-01 10:44
ubuntu 16.04.1

thojest
2017-02-01 10:44
docker-compose version 1.5.2

pd93
2017-02-01 10:45
I'm on Debian 8.6 with docker-compose 1.7.0 and it's running just fine

pd93
2017-02-01 10:46
The deb/ubuntu thing shouldn't be an issue, try updating docker-compose I guess? Not sure what wouldn't work though

thojest
2017-02-01 10:46
i think it has to do with docker version



pd93
2017-02-01 10:49
I think you could just remove the version tag tbh

pd93
2017-02-01 10:50
I don't think there is anything from v2/2.1/3 in there anyway

thojest
2017-02-01 10:50
i think it is like e.g. services

thojest
2017-02-01 10:50
the link you sent me

thojest
2017-02-01 10:50
this compatibility matrix

thojest
2017-02-01 10:50
does the version refer to docker version

thojest
2017-02-01 10:50
or docker-compose verison?

pd93
2017-02-01 10:51
left col is the compose version, the right is the docker version

pd93
2017-02-01 10:51
compose *format* version sorry

pd93
2017-02-01 10:52
So I currently have `docker v1.12.5`, `docker-compose v1.7.0` and that compose file looks pretty v1

thojest
2017-02-01 10:55
YEAHHH

thojest
2017-02-01 10:55
is just removed the first 2 lines from every yml file

thojest
2017-02-01 10:55
and it starts

thojest
2017-02-01 10:55
and even better

thojest
2017-02-01 10:55
`peer network login admin` with some random password

thojest
2017-02-01 10:55
gives me a token does not match error :slightly_smiling_face:

thojest
2017-02-01 10:56
THX a lot !!

pd93
2017-02-01 10:56
Glad it's all working :upside_down_face: No problem

thojest
2017-02-01 10:57
really big thanks for your compose files. they will help me later trying to understand the whole enrollment stuff

pd93
2017-02-01 10:58
If you updated your version of docker/docker-compose, I believe you'd be able to run them with those lines at the top. But tbh they're not really needed seeing as you just proved they will work with older versions

pd93
2017-02-01 10:58
Will probably remove them from mine too :stuck_out_tongue:

thojest
2017-02-01 10:59
:slightly_smiling_face: :+1:

pd93
2017-02-01 11:01
Oh... one other thing to note. I think you said you had security off before? With my docker compose stuff it is very much on :stuck_out_tongue:

thojest
2017-02-01 11:01
@pd93 yeah i noticed that but it isnt a problem. The next step would have been to turn it on and understand how it works. so your files are even a big help for my next step :slightly_smiling_face:

nickmelis
2017-02-01 11:02
do query invocations need a transaction? If so, do query transactions get broadcast to all nodes?

leoni
2017-02-01 11:06
has joined #fabric

donjohnny
2017-02-01 11:59
@donjohnny uploaded a file: https://hyperledgerproject.slack.com/files/donjohnny/F3YLUMGMP/pasted_image_at_2017_02_01_12_59_pm.png and commented: hi, why would hfc return me a sql: no results found in resultset?

thojest
2017-02-01 12:54
@pd93 so i played a bit with your files and uncommented the security features. then i had the same error like in the beginning. so i undid the uncomment stepwise and i found out that the reason was the following

thojest
2017-02-01 12:55
you have to set CORE_PEER_PKI_ECA_PADDR and CORE_PEER_PKI_TCA_PADDR

thojest
2017-02-01 12:55
i did not specify these in my initial setup

thojest
2017-02-01 12:55
so i guess these things have nothing to do with security enabled, it just tells the peer node where to find membersrvc

pd93
2017-02-01 13:33
@thojest Nice catch :slightly_smiling_face: That didn't even occur to me

ghadi
2017-02-01 16:39
has joined #fabric

raissa.xie
2017-02-01 18:23
has joined #fabric

raissa.xie
2017-02-01 18:37
Hi everyone! We are collecting some feedback and trying to improve the experience of using the Hyperledger Fabric documentation - for those of you attending the Hackfest and for others who may be interested, it would be great if you could fill out this short survey. Please feel free to direct message me if you have any additional feedback or questions! Thanks so much. https://www.surveygizmo.com/s3/3335420/Hackfest-Survey

jflowers
2017-02-01 19:19
has joined #fabric

schwentker
2017-02-01 20:10
has joined #fabric

lyons
2017-02-01 20:33
has joined #fabric

conroydave
2017-02-01 22:58
i am following the boiler plate API repo - and am using a 3rd party python script to create the user’s and things in the blockchain ledger… i can see them when i open the Node app and log in with one of the test data users. but for some reason when I try to act as newly created user (via my api script) in the Node app - it says the users are not registered and enrolled

conroydave
2017-02-01 22:58
it finds them, just doesnt allow me to act as them


conroydave
2017-02-01 22:59
i am using the add_user, add_thing

conroydave
2017-02-01 23:00
the comment regarding args 0 being the callerid directly above where i just linked is also confusing to me

conroydave
2017-02-01 23:00
i had to change args[1] to args[0] to get it the inserts to work

conroydave
2017-02-01 23:03
do i have somehow have to nodify the Node app that new users have been added to the chain and register them somehow?

conroydave
2017-02-01 23:04
or am i just confused that users in the chain have nothing to do with users in web app

jameshuckabymck
2017-02-01 23:42
has joined #fabric

glennscott
2017-02-02 00:51
has joined #fabric

conroydave
2017-02-02 03:35
you know youve got somethin completely wrong when your question gets crickets

coolsvap
2017-02-02 08:27
has joined #fabric

ankitkamra
2017-02-02 09:27
Hi all, I am running fabric v0.6 and i have setup 3 peers vp0, vp1 and vp2. vp0 is root peer. so i have given vp0 address as root peer in vp1 and vp2 docker-compose file. while i query through rest api "/network/peers" from vp0 it shows me 3 peers and if i query from vp1 or v2 it shows only 2 peers i.e. itself and root peer only. Similar if i am invoking chaincode from vp0 then all are in sync but if invoking from another peer i.e. vp1 or vp2 it sync transaction only to itself and root peer only

ankitkamra
2017-02-02 09:27
but logically all nodes must be in sync

ankitkamra
2017-02-02 09:29
can anyone please help me to resolve the problem ??

marcusvcs
2017-02-02 13:53
@conroydave I am no expert, but to act as an user via Node api you have to have the user certificate file in the keyvaluestore folder of your app

marcusvcs
2017-02-02 13:54
If the python script is enrolling the users, it must be placing that file somewhere

thojest
2017-02-02 14:17
hi everyone im exploring the consens algorithm pbft

thojest
2017-02-02 14:17
is there any explanation on what options there are for a docker-compose file and what they all mean?

tuand
2017-02-02 14:19
@thojest v0.6 ? the config options are described in the .yaml file in consensus directory

thojest
2017-02-02 14:19
yep 0.6

thojest
2017-02-02 14:19
let me have a look

tuand
2017-02-02 14:19
also the folks working on consensus hang out in #fabric-consensus-dev

thojest
2017-02-02 14:21
ahh ok

thojest
2017-02-02 14:21
well i found it. looks very nice but I feel again like an uber-noob :d

thojest
2017-02-02 14:21
is there a good resource which briefly explains pbft and gives you a broad overview?

thojest
2017-02-02 14:27
what do these options mean

thojest
2017-02-02 14:27
CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=fabric_

thojest
2017-02-02 14:27
CORE_PEER_NETWORKID=dev

o.o
2017-02-02 14:30
has joined #fabric

tuand
2017-02-02 14:30
@thojest, look for the PBFT paper by Castro and Liskov

thojest
2017-02-02 14:32
thx alot tuand will have alook at it

changyu
2017-02-02 16:47
has joined #fabric

kuberin
2017-02-02 16:51
has joined #fabric

glennscott
2017-02-02 17:13
Is this the right channel to ask build questions?

tom.appleyard
2017-02-02 17:37
has joined #fabric

jonathanlevi
2017-02-02 17:43
@glennscott: We usually address these in #fabric-dev-env and/or #ci-pipeline

glennscott
2017-02-02 18:33
ok thanks!

sstone1
2017-02-02 19:59
@sstone1 uploaded a file: https://hyperledgerproject.slack.com/files/sstone1/F40U3UCDU/fabric_composer_-_construct_2017.pptx and commented: Here are the slides I presented today at the Hyperledger Hackfest on Fabric Composer, an abstraction layer on top of Fabric to accelerate the development of business network applications.

claytonsims
2017-02-02 21:26
We are proposing the following content for an Alpha release. https://wiki.hyperledger.org/projects/proposedv1alphacontent . Take a look and we would really like feedback. Let us know what you think!

ghaskins
2017-02-02 22:12
@claytonsims I added FAB-678 as well as fixed a few typos

raissa.xie
2017-02-02 22:22
Hi everyone! Thanks so much to everyone who has discussed the documentation with us so far. Just a reminder, if you haven't filled out our survey yet, we'd love your feedback on the hyperledger fabric documentation - It would be a great help to us! https://www.surveygizmo.com/s3/3335420/Hackfest-Survey

jtrayfield
2017-02-02 22:58
are the Invoke’s stored on the blockchain? If not, what subset of the Invoke is stored?

jimyang
2017-02-03 02:43
has joined #fabric

dsanchezseco
2017-02-03 11:42
quick question: can I create admin users on runtime using the other admin account?

vadim
2017-02-03 11:48
in v0.6 you need to add them to membersrvc.yaml and then restart the service, in v1 (fabric-ca) you can

dsanchezseco
2017-02-03 11:52
in v0.6 is not possible adding the other roles to the delegateRoles field of admin?

vadim
2017-02-03 11:54
I think you are talking about fabric-ca

vadim
2017-02-03 11:54
in v0.6 it’s called membersrvc and it’s managed over yaml file


dsanchezseco
2017-02-03 11:59
yeah, i'll explain myself, i want to create other admin users w/o having to modify the membersrvc and restart the service. So i was wondering if doing something like ` admin: 1 Xurw3yU9zI0l institution_a '{"registrar":{"roles":["client","peer","validator","auditor"],"delegateRoles":["client","peer","validator","auditor"]}}'` on the membersrvc before the first start would abilitate the admin user to create other admins that can create peers, validators and so on?

dsanchezseco
2017-02-03 11:59
or should i wait till v1.0 with the new fabric-ca?

vadim
2017-02-03 12:00
I’m not sure whether v0.6 has this functionality

vadim
2017-02-03 12:00
I’m myself using v1

dsanchezseco
2017-02-03 12:02
which is the estimate release date of v1.0?

vadim
2017-02-03 12:02
I think alpha version should be quite soon

vadim
2017-02-03 12:02
but you can already use it, just the documentation is not very structured

dsanchezseco
2017-02-03 12:06
that has never been a problem hahahahaha we all know the blockchain's docs

vadim
2017-02-03 12:06
well then just use v1 :slightly_smiling_face:

garisingh
2017-02-03 12:06
@dsanchezseco - even in v0.6 you can add users and new admins

garisingh
2017-02-03 12:07
if you checkout the NodeSDK, you'll see some test files (something like *registrar*.js)

garisingh
2017-02-03 12:07
which show how to add new users/admins to membersrvcs

thojest
2017-02-03 12:22
hmm when i try to use grpcs for hfc sdk where do i get the certificates

dsanchezseco
2017-02-03 12:25
@garisingh can you post the URL because on https://github.com/hyperledger/fabric-sdk-node only seems to be code for v1


dsanchezseco
2017-02-03 12:32
well, i have the same doubt what should i do to register and enroll another admin user whit something like this ```// STEP 2: Register and enroll webAdmin and set as register function registrarTestStep2(cb) { console.log("registrarTest: STEP 2"); registerAndEnroll("webAdmin", "client", null, {roles:['client']}, chain, function(err,user) { if (err) return cb(err); webAdmin = user; chain.setRegistrar(webAdmin); registrarTestStep3(cb); }); }``` instead of WebAppAdmin able to create only clients be able to create another admins.

dsanchezseco
2017-02-03 12:32
something like this:

dsanchezseco
2017-02-03 12:34
admin -> admin2 ->client | |->admin4 | |->admin3 -> peer |->peer |-> client

garisingh
2017-02-03 12:58
`{roles:['client']}` means that you are registering webAdmin and granting webAdmin the authority to register other clients

dsanchezseco
2017-02-03 12:58
so if i fill that with other roles i'll be able to create them right?

dsanchezseco
2017-02-03 12:59
can you explain more in depth delegateRoles? is not fully clear on the comments

garisingh
2017-02-03 13:52
@dsanchezseco - been a while since I looked at this stuff. But yes - if you add additional types to the "roles", then the user will be able to register users with those roles

garisingh
2017-02-03 13:54
delegateRoles is used to indicate which roles that user can specify in the "roles" field when registering additional users

garisingh
2017-02-03 13:54
Put another way, if you don't have any delegateRoles, it means that when you register users, you will not be able to grant those users the right to register other users

cbf
2017-02-03 19:59
, please note that we are transitioning to use of RocketChat, so that we can maintain a searchable history of our discussions. @jonathanlevi posted instructions (below)

cbf
2017-02-03 20:00
use your LF id to login

aliblackwell
2017-02-03 20:01
So this slack is closing completely?

conroydave
2017-02-03 20:02
nooo

cbf
2017-02-03 20:03
@aliblackwell yes, but we are going to migrate the content once we get the population migrated

bis
2017-02-03 20:03
As an open source project you could get searchable slack history for free. Just ask Slack.

ghadi
2017-02-03 20:04
^^

conroydave
2017-02-03 20:06
and many of us already use slack in our organizations

ry
2017-02-03 20:09
has joined #fabric

ry
2017-02-03 20:10
@bis we worked on this with slack and we could not get them to bend.

rocket.chat
2017-02-03 20:10
has joined #fabric

2017-02-03 20:10
ping

conroydave
2017-02-03 20:11
what is lfid

conroydave
2017-02-03 20:11
nvm

2017-02-03 20:11

ry
2017-02-03 20:11
https://identity.linuxfoundation.org/ sign up with your email address first, don't use a social login the first time

conroydave
2017-02-03 20:17
hrm, getting a username already exists when using my newly created lfid.

conroydave
2017-02-03 20:17
outside of the rocketchat, it seems to be operating fine

matanyahu
2017-02-03 20:56
I am trying to obtain information about an average transaction size for Fabric. I want to use it for comparison against Bitcoin and Ethereum. Does anyone know how big is a “clean” transaction?

shannoncode
2017-02-03 21:24
I used to grab my history from slack and store it in airtable

ry
2017-02-03 21:35
@shannoncode http://hyperledgerproject.slackarchive.io/ exists but it's a recent addition so a bunch of stuff is lost

ghaskins
2017-02-03 22:49
@matanyahu at least on v0.6, they can be quite large

ghaskins
2017-02-03 22:50
I dont have data in front of me, I but I think I have put transactions through that were over 130k each

ghaskins
2017-02-03 22:50
not that I would advise this in all circumstances, but I have seen that

changyu
2017-02-03 23:43
why not use irc like normal people

ashnur
2017-02-03 23:52
because people are rude on irc

meraki
2017-02-04 03:32
Hello, What should the function `stub.GetCallerCertificate()` from the shim package supposed to return?How should it be used?

chungbd
2017-02-04 11:27
has joined #fabric

garisingh
2017-02-04 12:52
@meraki - should return the certificate used to sign the transaction which was submitted to the peer

matanyahu
2017-02-04 16:17
I am currently testing tx performance on Fabric 0.6 with Example02 chaincode. I created a bash script that executes a loop chaincode invoke command for 1000 times. I copied that script on 4 nodes, deployed in a PBFT-compliant mode (4 VPs + 1 membership service node). Here are my results: *Avg. Txn Latency 45ms Transaction Rate 15 /sec Mining Rate 8blocks/sec* . Has anyone got anything better than that?

spiro
2017-02-04 20:06
Hello everyone, I've been trying to run a hyperledger setup in windows & linux. In windows using Docker-compose, my question is what are the commands/settings to register my chaincode? Ref https://hyperledger-fabric.readthedocs.io/en/latest/Setup/Chaincode-setup/#starting-and-registering-the-chaincode .

spiro
2017-02-04 20:08
In the linux environment, I'm able to start the chaincode, but I get an error about a Go package "context" that is missing, which causes failure?!

spiro
2017-02-04 20:12
Question what is missing from these set of instructions, its mean for UNIX/Linux, but using Windows Docker presents new problems when using a powershell/cmd prompt: https://hyperledger-fabric.readthedocs.io/en/latest/Setup/Chaincode-setup/#writing-building-and-running-chaincode-in-a-development-environment

matanyahu
2017-02-04 20:17
@spiro : the best way is to deploy a clean docker environment just by pulling stable images from docker hub

matanyahu
2017-02-04 20:17
then, execute docker-compose with a selected topology

matanyahu
2017-02-04 20:18
and then, log in to one of VPs and deploy chaincode either as REST API or with peer chaincode deploy command

matanyahu
2017-02-04 20:18
that's what I do and I do not use the newest master

matanyahu
2017-02-04 20:19
images from docker hub dating back from 3 months ago are fair enough for me, especially that I want to have an environment identical to the one used on IBM Bluemix (0.6.1)

matanyahu
2017-02-04 20:19
take a look at this


spiro
2017-02-04 20:22
Okay , thank you - I forgot the virtual login part, very new to me.

spiro
2017-02-04 20:24
matanyahu: ok so I have to send the cmd: docker run vp0_1 for example

spiro
2017-02-04 20:25
Thanks for the links!

morgenhund
2017-02-04 20:26
@morgenhund pinned a message to this channel.

matanyahu
2017-02-04 20:27
after you select your docker-compose topology and run your network

spiro
2017-02-04 20:27
I now assume "docker exec -it vp0_1 bash

matanyahu
2017-02-04 20:27
log in to one of your containers representing one of peers deployed by docker-compose sscript

matanyahu
2017-02-04 20:28
and then you can start sending commands locally (peer cmdlets or REST API curl cmdlets against 0.0.0.0:7050)

matanyahu
2017-02-04 20:28
or from your workstation you can send commands remotely if you know your containers ip addresses

spiro
2017-02-04 20:29
Cool

spiro
2017-02-04 20:30
Is their an English version?

spiro
2017-02-04 20:42
I was referring to the text

spiro
2017-02-04 21:07
It logged in finally-had to re-id the image, thank you

spiro
2017-02-04 23:08
So that means all go code editing/building will need to occur within the VM image...in progress. Any other ways (from Windows files)?

raj.nair
2017-02-05 14:59
has joined #fabric

sibelius
2017-02-05 20:08
@aliblackwell our graphql + fabric boilerplate is open sourced: check it out here: https://github.com/entria/hyperledger-fabric-graphql-boilerplate

season7
2017-02-06 07:28
has joined #fabric

meraki
2017-02-06 09:52
Hello, How to set StateDB to COuchDB while starting the peer?

aliblackwell
2017-02-06 10:57
@sibelius congrats to you and @rafael.turk this looks awesome! playing with it today, will share feedback later on :slightly_smiling_face:

rafael.turk
2017-02-06 10:57
@aliblackwell tks! Plan is to migrate this to V1 as soon as possible

karnn
2017-02-06 12:11
I'm trying to get the hyper ledger boilerplate up and running but i'm getting the following error from the docker running the blockchain:



sibelius
2017-02-06 12:16
which boilerplate?



sibelius
2017-02-06 12:39
it is based on fabric-boilerplate

sibelius
2017-02-06 12:39
but it uses es6/7

karnn
2017-02-06 12:46
@garisingh hey, could you please check out the errors i've been getting with running the boilerplate?

denisglotov
2017-02-06 13:25
hi! Does the `membersrvc` need to be the only instance for the whole network (like in `four-peer-ca.yaml` example)? Or may each node has its own copy of `membersrvc` provided they all have the same config?

karnn
2017-02-06 13:48
@sibelius i'll check it out once i figure out whats up with my setup. thanks.

ercw
2017-02-06 14:15
has joined #fabric

ercw
2017-02-06 14:17
I'm trying to get a clear overview of how the consensus process works in Fabric but I'm not finding the answer to my question in the documentation. I am assuming nodes verify and sign blocks in a round-robin fashion? And that these signatures are counted by each nodes before adding a block to their own chain? Where can I get a detailed description of that process? Sorry if my assuming is completely off

tuand
2017-02-06 14:44
@ercw , re-ask over in https://chat.hyperledger.org

tuand
2017-02-06 14:44
oops... i see you did already nvm

deon
2017-02-06 17:49
has joined #fabric

jtrayfield
2017-02-06 18:31
my lfid doesn’t work at chat.hyperledger.org....


ry
2017-02-06 18:35
jtrayfield are you clicking the "login" button above the username/password?

jtrayfield
2017-02-06 18:36
@ry if I click that I get:


ry
2017-02-06 18:37
one second

ry
2017-02-06 18:37
try now

jtrayfield
2017-02-06 18:38
@ry works, thanks!

afarhan
2017-02-06 19:11
has joined #fabric

raghavsood
2017-02-07 06:58
has joined #fabric

eugenluft
2017-02-07 07:02
@eugenluft uploaded a file: https://hyperledgerproject.slack.com/files/eugenluft/F41T18DQS/pasted_image_at_2017_02_07_08_02_am.png and commented: hi all, I´m trying to launch the IBM fabric boilerplate but it ends with:

raghavsood
2017-02-07 07:18
@ry I'm getting the same errors as jtrayfield :confused:

ry
2017-02-07 07:24
@raghavsood try now

raghavsood
2017-02-07 07:25
Works :slightly_smiling_face:

hrishikeshio
2017-02-07 07:32
has joined #fabric

hrishikeshio
2017-02-07 07:32
Hi Guys getting this error when following tutorial

hrishikeshio
2017-02-07 07:32

ry
2017-02-07 07:44
@hrishikeshio please join us on https://chat.hyperledger.org/

hrishikeshio
2017-02-07 08:57
ok

hrishikeshio
2017-02-07 08:58
new suer registration is disabled :neutral_face:

hrishikeshio
2017-02-07 08:58
user

abhinav.garg
2017-02-07 09:01
can I get any POC working with hyperledger any demo excluding IBM marbles,car lease


mhagelstrom
2017-02-07 11:32
@abhinav.garg you can find a few demos (the ones you excluded + commercial paper) on the bluemix platform if you follow the link: https://console.ng.bluemix.net/docs/services/blockchain/ibmblockchain_tutorials.html

mhagelstrom
2017-02-07 11:34
Try repeating the question on the new chat platform. You might get other replies over there.

gatakka
2017-02-07 13:12
Hello, I am playing with HL from master branch and when I try to make a invocation request to peer i receive gRPC error: code = 2 desc = Failed to deserialize creator identity, err MSP admin is unknown User admin is enrolled from CA and has proper cert I am using docker images and docker-compose from https://github.com/hyperledger/fabric/blob/master/docs/gettingstarted.md Any idea what may cause MSP not to find user admin (or any other user) When i do invocation from CLI everything is working properly.

thojest
2017-02-07 13:44
hi everyone, following question considering Hyperledger v 0.6 When I create a webapp and I want to handle user login, how would i do that? afaik there are several security layers

thojest
2017-02-07 13:44
1)webapp 2) membersrvc 3) blockchain

thojest
2017-02-07 13:47
So if the user wants to login is this the best way of doing this??? - take username and password - encrypt passwords and sends details to chaincode - chaincode checks that encrypted passwords match - If correct send, success message back to node - node then enrols the user so that the app can send transactions as the user with the returned cert - It also creates a session so that it knows it is allowed to use the cert.

thojest
2017-02-07 13:47
what confuses me is the following point

thojest
2017-02-07 13:48
I thought membesrvc manages all this user authentification stuff?

thojest
2017-02-07 13:49
do i have to write user + hash(password) to the blockchain?


magg
2017-02-07 15:58
has joined #fabric

magg
2017-02-07 15:58
hello

magg
2017-02-07 15:58
i was reading about 3 types of nodes... consenter, etc. could you give me more background information. How do I know what type of node my peers are, or how can I configure that? I also heard about an orderer node

cedoor
2017-02-07 17:15
Hello, is it possible to get the data of an old state of smart conctract ( after overwrite invoke functions ) in Fabric?

ry
2017-02-07 18:02

ry
2017-02-07 18:03
@ry archived the channel (w/ 1,012 members)